-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use stash-plugin-builder's dependencyInstaller
- Loading branch information
Showing
10 changed files
with
25 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 5 additions & 7 deletions
12
Plugins/ReplaceThumbnailsWithImages/ReplaceThumbnailsWithImages.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
export default async () => { | ||
while (!window.TetraxUSL?.stash) { | ||
while (!window.stash) { | ||
await new Promise((resolve) => setTimeout(resolve, 100)) | ||
} | ||
|
||
const Stash = window.TetraxUSL.stash | ||
|
||
async function replaceThumbnailsWithImages(timeOut, className) { | ||
await Stash.waitForElement(className, timeOut, document.body, true) | ||
await stash.waitForElement(className, timeOut, document.body, true) | ||
|
||
const allThumbnailElement = document.querySelectorAll(className) | ||
allThumbnailElement.forEach((element) => { | ||
element.src = element.src.replace("/thumbnail", "/image") | ||
}) | ||
} | ||
|
||
Stash.addEventListeners(["stash:page:images:grid", "stash:page:any:images:grid", "stash:page:gallery", "stash:page:gallery:add", "stash:page:home"], () => { | ||
stash.addEventListeners(["stash:page:images:grid", "stash:page:any:images:grid", "stash:page:gallery", "stash:page:gallery:add", "stash:page:home"], () => { | ||
replaceThumbnailsWithImages(5000, ".image-card-preview-image") | ||
}) | ||
Stash.addEventListeners(["stash:page:galleries:grid", "stash:page:any:galleries:grid", "stash:page:home"], () => { | ||
stash.addEventListeners(["stash:page:galleries:grid", "stash:page:any:galleries:grid", "stash:page:home"], () => { | ||
replaceThumbnailsWithImages(5000, ".gallery-card-image") | ||
}) | ||
Stash.addEventListeners(["stash:page:galleries:list", "stash:page:any:galleries:list"], () => { | ||
stash.addEventListeners(["stash:page:galleries:list", "stash:page:any:galleries:list"], () => { | ||
replaceThumbnailsWithImages(5000, ".w-100.w-sm-auto") | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 0 additions & 85 deletions
85
Plugins/TetraxUserscriptLibrary/TetraxUserscriptLibrary.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.