Center Image & Video

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

< Feedback on Center Image & Video

Question/comment

§
Posted: 25/09/2019

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: 25/09/2019

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: 26/10/2019

@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.