summaryrefslogtreecommitdiffstats
path: root/web_src/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r--web_src/js/index.js29
1 files changed, 3 insertions, 26 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index 9e699c1a2e..992295addf 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -1,4 +1,4 @@
-/* globals wipPrefixes, issuesTribute, emojiTribute */
+/* globals wipPrefixes */
/* exported timeAddManual, toggleStopwatch, cancelStopwatch */
/* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */
@@ -15,6 +15,7 @@ import initGitGraph from './features/gitgraph.js';
import initClipboard from './features/clipboard.js';
import initUserHeatmap from './features/userheatmap.js';
import initDateTimePicker from './features/datetimepicker.js';
+import {initTribute, issuesTribute, emojiTribute} from './features/tribute.js';
import createDropzone from './features/dropzone.js';
import highlight from './features/highlight.js';
import ActivityTopAuthors from './components/ActivityTopAuthors.vue';
@@ -47,7 +48,6 @@ function initCommentPreviewTab($form) {
}, (data) => {
const $previewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('preview')}"]`);
$previewPanel.html(data);
- emojify.run($previewPanel[0]);
$('pre code', $previewPanel[0]).each(function () {
highlight(this);
});
@@ -79,7 +79,6 @@ function initEditPreviewTab($form) {
}, (data) => {
const $previewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('preview')}"]`);
$previewPanel.html(data);
- emojify.run($previewPanel[0]);
$('pre code', $previewPanel[0]).each(function () {
highlight(this);
});
@@ -100,7 +99,6 @@ function initEditDiffTab($form) {
}, (data) => {
const $diffPreviewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('diff')}"]`);
$diffPreviewPanel.html(data);
- emojify.run($diffPreviewPanel[0]);
});
});
}
@@ -256,10 +254,6 @@ function initReactionSelector(parent) {
react.appendTo(content);
}
react.html(resp.html);
- const hasEmoji = react.find('.has-emoji');
- for (let i = 0; i < hasEmoji.length; i++) {
- emojify.run(hasEmoji.get(i));
- }
react.find('.dropdown').dropdown();
initReactionSelector(react);
}
@@ -1006,7 +1000,6 @@ async function initRepository() {
$renderContent.html($('#no-content').html());
} else {
$renderContent.html(data.content);
- emojify.run($renderContent[0]);
$('pre code', $renderContent[0]).each(function () {
highlight(this);
});
@@ -1333,7 +1326,6 @@ function initWikiForm() {
text: plainText
}, (data) => {
preview.innerHTML = `<div class="markdown ui segment">${data}</div>`;
- emojify.run($('.editor-preview')[0]);
$(preview).find('pre code').each((_, e) => {
highlight(e);
});
@@ -1505,7 +1497,6 @@ function setSimpleMDE($editArea) {
text: plainText
}, (data) => {
preview.innerHTML = `<div class="markdown ui segment">${data}</div>`;
- emojify.run($('.editor-preview')[0]);
});
}, 0);
@@ -2474,21 +2465,6 @@ $(document).ready(async () => {
});
}
- // Emojify
- emojify.setConfig({
- img_dir: `${AppSubUrl}/vendor/plugins/emojify/images`,
- ignore_emoticons: true
- });
- const hasEmoji = document.getElementsByClassName('has-emoji');
- for (let i = 0; i < hasEmoji.length; i++) {
- emojify.run(hasEmoji[i]);
- for (let j = 0; j < hasEmoji[i].childNodes.length; j++) {
- if (hasEmoji[i].childNodes[j].nodeName === 'A') {
- emojify.run(hasEmoji[i].childNodes[j]);
- }
- }
- }
-
// Helpers.
$('.delete-button').on('click', showDeletePopup);
$('.add-all-button').on('click', showAddAllPopup);
@@ -2614,6 +2590,7 @@ $(document).ready(async () => {
initContextPopups();
initNotificationsTable();
initNotificationCount();
+ initTribute();
// Repo clone url.
if ($('#repo-clone-url').length > 0) {