Closed hardpenguin closed 10 months ago
Hold your horses with the reply, I am testing changing the userscript @inject-into setting to "auto" in ViolentMonkey... So far so good... I'll let you know
I already had exactly the same issues with Firefox in Windows, sometimes it loads, sometimes not. What seemed to help is a forced reload (e.g. by holding the Shift-Key), but of course that's not really a solution. But this issue only occurs with Violentmonkey, not with Greasemonkey, which is why I for now use Greasemonkey in Firefox instead.
ps: a couple of days ago I had spent half a day for finding a workaround for this Violentmonkey-Firefox-CSP issue, unfortunately without success. It smells like some bug in Violentmonkey, since as mentioned it never occurs in Greasemonkey in the same browser.
pps: I forgot to mention, "@inject-into auto" would disable the ability to "hook" into Twitter's XMLHttpRequest calls, which is needed to support "Cards" in Bluesky (in Bluesky they have to be created on the client side, whereas in Mastodon the server/instance/endpoint takes care of it). But yes, if you only use Mastodon anyway, this should fix the issue.
I see! Thanks for all the details. It looks like that setting fixed the issue for me. Yeah it is frustrating because some userscripts work better in Tampermonkey, other in Violentmonkey etc. (Greasemonkey is not recommended because it has not been updated in 3 years).
Feel free to close this issue if you feel this solves it, at least for now.
Oops, my bad! When I wrote "Greasemonkey" above I actually always meant "Tampermonkey" - I don't have this old Greasemonkey installed anywhere. It's just too many monkeys, that's why I got a little confused :-)
FYI, I know added this as "Known limitation" to the README and closed the issue.
Like in the description, the userscript sometimes does not load. It happens, I don't know, less than 50% of the time I load Twitter in my browser tab? What often helps (but not always) is performing a forced reload/refresh (CTRL+F5) of the tab.
The very latest stable versions of the userscript (0.11), Firefox (119.0), and ViolentMonkey (2.16.0) were used. Not sure how to debug this? Happy to follow any debugging steps if you're willing to do that together.
I believe this is the error message from the developer console:
Which in turn led me to the debugger output (attached). debugger_output.txt
I did some digging and I suspect this might be related (I might be wrong though, I don't know a first thing about modern web development): https://github.com/violentmonkey/violentmonkey/issues/173