|
|
|
|
|
by roryokane
2248 days ago
|
|
I use Violentmonkey because unlike Tampermonkey, it’s open source, and unlike Greasemonkey, it supports old user scripts that use the synchronous `GM_…` functions such as `GM_getValue` and `GM_setValue`. Greasemonkey 4, released in 2017, introduced a new asynchronous API `GM.…` (e.g. `GM.getValue`), and dropped support for the equivalent synchronous `GM_…` functions: https://www.greasespot.net/2017/09/greasemonkey-4-for-script.... There also used to be some functions such as `GM_registerMenuCommand` that Greasemonkey 4 provided no equivalent to. However, it looks like Greasemonkey’s polyfill (https://github.com/greasemonkey/gm4-polyfill) has expanded its support for the old `GM_…` functions since I last checked, so maybe migrating old scripts I use to Greasemonkey 4’s new API won’t be as difficult and limiting as the last time I considered it. I probably won’t bother unless I have a reason to switch away from Violentmonkey, though. The user script I use that still uses the old APIs is Webcomic Reader, if you’re wondering. It preloads previous and next comics to speed up browsing, and restyles sites to show hidden per-comic bonuses like title text. It’s at https://github.com/anka-213/webcomic_reader, and its issue about potential Greasemonkey migration is at https://github.com/anka-213/webcomic_reader/issues/130. |
|