-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not Compatible with GM 4.x #3
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works great on pre-webext (aka pre 4.0) version of GM on ESR but on versions where you can't use it and need to use the post 4.0 version (aka from 57+) then it doesn't work due to changes in the API.
Using TamperMonkey is not an option as it doesn't behave correctly and has too many quirks and even to make it run on that, you can add
var
in front ofgmSet
andgmGet
to make it work, but that's not the issue really, just that TM is very finicky and with the developer shutting down the forum, its practically unsupportable.The changes to the API for GM would mean that the two
@grant
entries forGM_setValue
andGM_getValue
need to be changed to the GM global object, akaGM.setValue
andGM.getValue
but that's unfortunately the only easy part of it. While thesetValue
is relatively without fuss, thegetValue
is much more involved that requires the use of async functions andawait
to properly return the value and avoid timing issues.While not alot needs to be changed, it does need some reworking as with the spread of webext and the deprecation of browsers that can handle original GM, you need to bring this script inline with the newer methods to ensure compatibility. Maintaining backward compatibility if you want it, shouldm't be hard but again, needs some reworking. To avoid nagging in general, convert
gmSet
andgmGet
to variables by adding thevar
it makes it more stable all around.I have made tweaks to my own copy and have somewhat gotten it work right but still getting alot of glowing red llama errors/timeouts so hopefully you can do a less hacky version that works better. Let me know if I can help, but this would be a good start for you here: API Changes and GM.getValue and GM.setValue - hit me up if you need me to help or test anything.
The text was updated successfully, but these errors were encountered: