timo95 / stash-checker

Userscript to check if a Scene/Performer is present in Stash
MIT License
14 stars 3 forks source link

Unresponsive if run with StashDB Backlog Userscript #12

Closed timo95 closed 11 months ago

timo95 commented 11 months ago

A user reports the browser hanging up when both userscripts run on the same site. Browser: Edge Addon: Tampermonkey

See StashDB Backlog Userscript

Both scripts use Mutation Observers, which probably results in an endless loop of DOM updates. Sadly the Mutation Observer API is limited. It is not possible to stop Mutation Observers from observing DOM insertions unless you have the actual Mutation Observer object and disconnect it before the insertion. It is not possible to get all currently active Mutation Observers for the document or an element.

To fix this collision, the selector strings have to stop matching elements added by the scripts. In the worst case changes to StashDB Backlog Userscript might be required.

timo95 commented 11 months ago

11 may actually help here

timo95 commented 11 months ago

Cannot reproduce. Waiting for feedback how to reproduce.

timo95 commented 11 months ago

Seems to have gone away now