Closed plz-send-help closed 1 year ago
Figured out an alternative method, by just stalking the dom for any changes. A bit bruteforcy, but at least it works nice and without delay :)
Change age >= 40, to whatever your preferred cutoff age is.
Just for the future reference, custom add-ons and their issues are better suited for https://github.com/stashapp/CommunityScripts repository.
EDIT:
WORKING SCRIPT: (Tested with: v0.20.2-23-g55d3deee)
Scope
Being able to hide the age of performers after a certain age range has been met.
Long Form
On the Performer page, things can get awkward if you have any vintage content, or even content from 20 years ago. While on the scenes view, it's usually not an issue (due to the calculated age of the performer based on the scene) However I feel like it's advantages to be able to hide ages after a certain range. Hence this javascript mod.
Examples
This is my current (half-working) version of the script: Tested with: v0.20.2-23-g55d3deee
Current Issues
I cant for the life of me figure out how to call my function, after the cards have been loaded, without relying on a timeout. • I've tried altering the existing function, which creates the performer cards - however had no success in inserting my script between loading of the PerformerCard js and its execution • I've also tried various forms of loading my function after the dom is done, however my usual methods either didn't work at all, or were still too soon.
Neither does it work on page change.
Any advice on having my function called without timeout would be greatly appreciated.