debian-mirror-gitlab/app/assets/javascripts/image_diff/init_discussion_tab.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
495 B
JavaScript
Raw Normal View History

2019-12-04 20:38:33 +05:30
import initImageDiffHelper from './helpers/init_image_diff';
2018-03-17 18:26:18 +05:30
export default () => {
// Always pass can-create-note as false because a user
// cannot place new badge markers on discussion tab
const canCreateNote = false;
const renderCommentBadge = true;
const diffFileEls = document.querySelectorAll('.timeline-content .diff-file.js-image-file');
2021-03-08 18:12:59 +05:30
[...diffFileEls].forEach((diffFileEl) =>
2019-12-04 20:38:33 +05:30
initImageDiffHelper.initImageDiff(diffFileEl, canCreateNote, renderCommentBadge),
2018-12-13 13:39:08 +05:30
);
2018-03-17 18:26:18 +05:30
};