Center Image & Video

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

< Σχολιασμός για τον κώδικα Center Image & Video

Ερώτηση/σχόλιο

§
Δημοσιεύτηκε: 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 :)

OwynΔημιουργός
§
Δημοσιεύτηκε: 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

§
Δημοσιεύτηκε: 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.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.