Skip to content

Commit

Permalink
Merge pull request #221 from Tetrax-10/main
Browse files Browse the repository at this point in the history
improve page listeners
  • Loading branch information
Maista6969 authored Jan 22, 2024
2 parents 4f0131d + d3ed7cb commit fc7b4cc
Show file tree
Hide file tree
Showing 6 changed files with 578 additions and 237 deletions.
2 changes: 1 addition & 1 deletion plugins/sceneCoverCropper/sceneCoverCropper.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
cropBtnContainer.appendChild(cropInfo);
}

stash.addEventListener('page:scene', function () {
stash.addEventListener('stash:page:scene', function () {
waitForElementId('scene-edit-details', setupCropper);
});
})();
4 changes: 2 additions & 2 deletions plugins/stashAI/stashai.js
Original file line number Diff line number Diff line change
Expand Up @@ -3615,15 +3615,15 @@
}
}

stash.addEventListener("page:scene", function () {
stash.addEventListener("stash:page:scene", function () {
let elms = ".ml-auto .btn-group";
waitForElm(elms).then(() => {
if (!document.querySelector("#stashmarker")) {
new MarkerButton({ target: document.querySelector(elms) });
}
});
});
stash.addEventListener("page:scene", function () {
stash.addEventListener("stash:page:scene", function () {
let elms = ".ml-auto .btn-group";
waitForElm(elms).then(() => {
if (!document.querySelector("#stashtag")) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/stashRealbooru/stash-realbooru.js
Original file line number Diff line number Diff line change
Expand Up @@ -10054,7 +10054,7 @@
}
}

stash.addEventListener("page:image", function () {
stash.addEventListener("stash:page:image", function () {
let elms = ".ml-auto .btn-group";
waitForElm(elms).then(() => {
if (!document.querySelector("#stashrealbooru")) {
Expand Down
Loading

0 comments on commit fc7b4cc

Please sign in to comment.