debian-mirror-gitlab/app/assets/javascripts/snippet/snippet_show.js

22 lines
677 B
JavaScript
Raw Normal View History

2020-04-22 19:07:51 +05:30
import LineHighlighter from '~/line_highlighter';
import BlobViewer from '~/blob/viewer';
import ZenMode from '~/zen_mode';
import initNotes from '~/init_notes';
import snippetEmbed from '~/snippet/snippet_embed';
import { SnippetShowInit } from '~/snippets';
2020-11-24 15:15:51 +05:30
import loadAwardsHandler from '~/awards_handler';
2020-04-22 19:07:51 +05:30
document.addEventListener('DOMContentLoaded', () => {
if (!gon.features.snippetsVue) {
new LineHighlighter(); // eslint-disable-line no-new
new BlobViewer(); // eslint-disable-line no-new
initNotes();
new ZenMode(); // eslint-disable-line no-new
snippetEmbed();
} else {
SnippetShowInit();
initNotes();
}
2020-11-24 15:15:51 +05:30
loadAwardsHandler();
2020-04-22 19:07:51 +05:30
});