debian-mirror-gitlab/app/assets/javascripts/image_diff/init_discussion_tab.js
2019-12-04 20:38:33 +05:30

13 lines
493 B
JavaScript

import initImageDiffHelper from './helpers/init_image_diff';
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');
[...diffFileEls].forEach(diffFileEl =>
initImageDiffHelper.initImageDiff(diffFileEl, canCreateNote, renderCommentBadge),
);
};