Attempting to bookmark images on member.php pages (potentially others too), will show the heart icon, but upon refreshing not actually be bookmarked. Checking the console (see logs below), it seems the CSRF token fetching has been changed - it's now a JSON object under a <meta> tag with the ID meta-global-data, which is parsed and then removed before Patchouli loads (see screenshots).
Suggested fix would be something along the lines of adding the @run-at document-start userscript directive, snagging the token (e.g. JSON.parse(document.getElementById("meta-global-data").content).token), then waiting for the document to load to run the rest of the script. I didn't attempt this as I'm not familiar enough with the codebase to make a change this large.
Describe the bug
Attempting to bookmark images on member.php pages (potentially others too), will show the heart icon, but upon refreshing not actually be bookmarked. Checking the console (see logs below), it seems the CSRF token fetching has been changed - it's now a JSON object under a
<meta>
tag with the IDmeta-global-data
, which is parsed and then removed before Patchouli loads (see screenshots).Suggested fix would be something along the lines of adding the
@run-at document-start
userscript directive, snagging the token (e.g.JSON.parse(document.getElementById("meta-global-data").content).token
), then waiting for the document to load to run the rest of the script. I didn't attempt this as I'm not familiar enough with the codebase to make a change this large.Steps to reproduce
Screenshots
Environment
Debug messages