Skip to content

Commit

Permalink
support v0.25.0 studios and tags scene page url change
Browse files Browse the repository at this point in the history
  • Loading branch information
7dJx1qP committed Feb 24, 2024
1 parent 99057de commit db17d98
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
11 changes: 11 additions & 0 deletions plugins/stashBatchSave/stashBatchSave.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,15 @@
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initRemoveButtons);
});

// v0.24.3 compatibility
stash.addEventListener('page:studio', function () {
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initRemoveButtons);
});
stash.addEventListener('page:tag', function () {
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initRemoveButtons);
});
stash.addEventListener('page:performer', function () {
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initRemoveButtons);
});

})();
2 changes: 1 addition & 1 deletion plugins/stashBatchSave/stashBatchSave.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Stash Batch Save
# requires: stashUserscriptLibrary7dJx1qP
description: Adds a batch save button to scenes tagger
version: 0.5.6
version: 0.5.7
url: https://github.com/7dJx1qP/stash-plugins#stash-batch-save
ui:
requires:
Expand Down
12 changes: 12 additions & 0 deletions plugins/stashSceneTaggerDraftSubmit/stashSceneTaggerDraftSubmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,16 @@
stash.addEventListener('page:scenes', function () {
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initDraftButtons);
});

// v0.24.3 compatibility
stash.addEventListener('page:studio', function () {
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initDraftButtons);
});
stash.addEventListener('page:tag', function () {
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initDraftButtons);
});
stash.addEventListener('page:performer', function () {
waitForElementByXpath("//button[contains(@class, 'btn-primary') and text()='Scrape by fragment']", initDraftButtons);
});

})();
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Stash Scene Tagger Draft Submit
# requires: stashUserscriptLibrary7dJx1qP
description: Adds button to Scene Tagger to submit draft to stashdb
version: 0.1.3
version: 0.1.4
url: https://github.com/7dJx1qP/stash-plugins#stash-scene-tagger-draft-submit
ui:
requires:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
this.dispatchLocationEvent(new Event('page:studio:childstudios'));
}
// studio scenes page
else if (this.matchUrl(location, /\/studios\/\d+\?/)) {
else if (this.matchUrl(location, /\/studios\/\d+\/scenes/)) {
this.log.debug('[Navigation] Studio Page - Scenes');
this.processTagger();
this.dispatchLocationEvent(new Event('page:studio:scenes'));
Expand Down Expand Up @@ -663,7 +663,7 @@
this.dispatchLocationEvent(new Event('page:tag:performers'));
}
// tag scenes page
else if (this.matchUrl(location, /\/tags\/\d+\?/)) {
else if (this.matchUrl(location, /\/tags\/\d+\/scenes/)) {
this.log.debug('[Navigation] Tag Page - Scenes');
this.processTagger();
this.dispatchLocationEvent(new Event('page:tag:scenes'));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 7dJx1qP's Stash Userscript Library
description: Exports utility functions and a Stash class that emits events whenever a GQL response is received and whenenever a page navigation change is detected
version: 0.41.1
version: 0.42.0
url: https://github.com/7dJx1qP/stash-plugins
ui:
javascript:
Expand Down

0 comments on commit db17d98

Please sign in to comment.