Skip to content

Commit

Permalink
Merge pull request #9 from zxy19/dev_change_image_selector
Browse files Browse the repository at this point in the history
Add .Post-body class selector and exclude .no-fancybox class
  • Loading branch information
iamdarkle authored Sep 2, 2024
2 parents 837d0e9 + 8fb5072 commit 9ab9359
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/dist/forum.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ app.initializers.add('darkle/fancybox', () => {

extend(CommentPost.prototype, 'oncreate', function (vnode) {
this.element
.querySelectorAll('img:not(.emoji):not(.Avatar):not(.PostMeta-ip img):not([data-reaction]):not([data-link-preview]):not(.flamoji img):not(.countryFlag)')
.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)')
.forEach((node) => {
const fancyboxEl = document.createElement('a');
fancyboxEl.setAttribute('data-fancybox', 'responsive');
Expand Down

0 comments on commit 9ab9359

Please sign in to comment.