Greasy Fork is available in English.

Center Image & Video

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

< 腳本Center Image & Video的回應

提問/評論

§
發表於: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 :)

Owyn作者
§
發表於: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

§
發表於: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.

發表回覆

登入以回復