stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.56k stars 769 forks source link

[Feature] Add window.stash object to provide simple functions for bookmarklets and customizations #4723

Open StashPowerUser opened 4 months ago

StashPowerUser commented 4 months ago

It would be nice if bookmarklets could do some simple actions like window.stash.setSceneRating(90) and other common tasks to allow for easy extension of the stash frontend.

On a similar note, is there any documentation for the existing UI plugin system anywhere for someone looking to get started with customizations that way?

DogmaDragon commented 4 months ago

On a similar note, is there any documentation for the existing UI plugin system anywhere for someone looking to get started with customizations that way?

StashPowerUser commented 4 months ago

Cool, thanks for pointing this out.

From looking at this though it seems highly targeted at use in react (exposed hooks that can't be used outside components) and isn't useful for simpler interactions like bookmarklets.

feederbox826 commented 2 months ago

Since "comon" simple functions do vary wildly, a lot of userscripts and plugins instead rely on customizable / reusable GQL queries

Libaries like https://github.com/stashapp/CommunityScripts/tree/main/plugins/CommunityScriptsUILibrary https://github.com/7dJx1qP/stash-plugins/tree/main/plugins/stashUserscriptLibrary7dJx1qP

Have some reusable queries but also allow access to advanced and customizable GQL queries