Closed Zorgodon closed 2 years ago
What part of the userscript doesn't work in Pale Moon / what is the behavior?
The error in the console is:
expected expression, got '.' Return_Youtube_Dislike.user.js:28:7
Line 28: ?.querySelector("#top-level-buttons-computed");
If I comment it out, I get the same error, now for
Line 236: if (getButtons()?.offsetParent && isVideoLoaded()) {
It seems PM doesn't like the '?.' syntax, but unfortunately I don't know JS so I'm not sure what '?.' means.
The script doesn't log 'starting up' to the console as it's getting bogged down in what it thinks are errors in the function
definitions.
I'm using Greasemonkey 3.31.4
by the way.
The userscript is made for tampermonkey as seen on the website https://www.returnyoutubedislike.com/install. There is no official support for greasemonkey. Can you use tampermonkey instead?
Btw, the ? in line 236 is part of Optional Chaining which is a feature introduced in 2020.
Changing .?
to .
made it work.
According to Mozilla, the latter returns an error rather than a string if a reference is undefined.
I don't see any errors in my console on PM or Chrome when running with the change, so I think this is a sensible patch to increase browser compatibility.
Patch here (currently closed as it removes the hover stats feature that doesn't work in PM): https://github.com/Anarios/return-youtube-dislike/pull/234
Extension or Userscript?
Userscript
Request or suggest a new feature!
Is there any chance you could make the userscript compatible with Pale Moon/UXP Browsers (http://www.palemoon.org) ?
Ways to implement this!
No response
Can you work on this?