stash icon indicating copy to clipboard operation
stash copied to clipboard

Add injected css/javascript to plugins

Open WithoutPants opened this issue 3 years ago • 0 comments

Adds uiJavascript and uiCSS fields to plugin configuration format.

This allows for css and java script injection from plugins. uiJavascript files are returned from the /javascript endpoint, before the contents of the custom injected javascript. uiCSS files are returned from the /css endpoint, before the custom.css file.

For example, here is a plugin configuration to enable SFW mode from the wiki CSS snippets page:

name: SFW mode
description: Blurs covers and images
url: https://github.com/stashapp/CommunityScripts
version: 1.0
uiCSS:
 - sfw.css

sfw.css is a file in the same directory as the yml file containing the SFW mode css.

TODO: documentation

WithoutPants avatar Nov 26 '22 21:11 WithoutPants