Center Image & Video

Improved controls for images & videos opened directly with your browser - hotkeys & resizing & visuals

< Feedback on Center Image & Video

Question/comment

§
Posted: 2019-09-25

Adding GM4 polyfill

Currently some userscript handlers (such as Violentmonkey) don't support GM.* functions. Would it be possible to add the GM4 polyfill for these handlers?

https://github.com/greasemonkey/gm4-polyfill

This will allow the script to run on both newer and older ones :)

OwynAuthor
§
Posted: 2019-09-25

If you want an alternative to greasemonkey you could try TamperMonkey, these are two main and most popular userscript handlers, GM_ is legacy which slows down the browser and should be avoided when possible

§
Posted: 2019-10-26

@Owyn said: If you want an alternative to greasemonkey you could try TamperMonkey, these are two main and most popular userscript handlers, GM_ is legacy which slows down the browser and should be avoided when possible

Actually in Violentmonkey it's handled pretty quickly, it's just a simple object key lookup. In fact, it slows the browser down less than GM.* (in theory anyways, in practice the difference shouldn't be noticeable).

The polyfill won't affect performance for Greasemonkey or Tampermonkey, it will only allow the script to work for userscript managers that don't support GM.* APIs.

Post reply

Sign in to post a reply.