Này người xa lạ!

Còn chờ gì nữa mà không mau đăng nhập hoặc đăng ký để cùng tham gia thảo luận với cộng đồng!

Adding GM4 polyfill

About: Center Image

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 :)

Bình luận

  • 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

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

Đăng nhập hoặc Đăng ký để gửi bình luận.