Skip to content

Commit 8fb5072

Browse files
committed
Add .Post-body class to image selector to avoid breaking other extension that adds images out of the post.
Add exclude class .no-fancybox to allow developer make their extension compatible with this one.
1 parent 837d0e9 commit 8fb5072

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: js/dist/forum.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/dist/forum.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/src/forum/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ app.initializers.add('darkle/fancybox', () => {
88

99
extend(CommentPost.prototype, 'oncreate', function (vnode) {
1010
this.element
11-
.querySelectorAll('img:not(.emoji):not(.Avatar):not(.PostMeta-ip img):not([data-reaction]):not([data-link-preview]):not(.flamoji img):not(.countryFlag)')
11+
.querySelectorAll('.Post-body img:not(.emoji):not(.Avatar):not(.PostMeta-ip img):not([data-reaction]):not([data-link-preview]):not(.flamoji img):not(.countryFlag):not(.no-fancybox)')
1212
.forEach((node) => {
1313
const fancyboxEl = document.createElement('a');
1414
fancyboxEl.setAttribute('data-fancybox', 'responsive');

0 commit comments

Comments
 (0)