All files / app/assets/javascripts/behaviors index.js

0% Statements 0/11
0% Branches 0/2
0% Functions 0/3
0% Lines 0/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40                                                                               
import $ from 'jquery';
import './autosize';
import initCollapseSidebarOnWindowResize from './collapse_sidebar_on_window_resize';
import initCopyToClipboard from './copy_to_clipboard';
import installGlEmojiElement from './gl_emoji';
import initCopyAsGFM from './markdown/copy_as_gfm';
import './quick_submit';
import './requires_input';
import { initToastMessages } from './toasts';
import { initGlobalAlerts } from './global_alerts';
import './shortcuts';
import './toggler_behavior';
import './preview_markdown';
 
installGlEmojiElement();
 
initCopyAsGFM();
initCopyToClipboard();
 
initCollapseSidebarOnWindowResize();
 
initToastMessages();
 
initGlobalAlerts();
 
window.requestIdleCallback(
  () => {
    // Check if we have to Load GFM Input
    const $gfmInputs = $('.js-gfm-input:not(.js-gfm-input-initialized)');
    if ($gfmInputs.length) {
      import(/* webpackChunkName: 'initGFMInput' */ './markdown/gfm_auto_complete')
        .then(({ default: initGFMInput }) => {
          initGFMInput($gfmInputs);
        })
        .catch(() => {});
    }
  },
  { timeout: 500 },
);