You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of gmSet and gmGet 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 for GM_setValue and GM_getValue need to be changed to the GM global object, aka GM.setValue and GM.getValue but that's unfortunately the only easy part of it. While the setValue is relatively without fuss, the getValue is much more involved that requires the use of async functions and await 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 and gmGet to variables by adding the var 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:
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: