Based on the gm4-polyfill.js script from the greasemonkey devs. But not the same because that script doesn't work for us for a couple of reasons: * It assumes all GM_* functions are attributes of `this` which in this case is the global window object. Which breaks it out of our iife. It is possible to change what `this` is within the iife but then we would have to do something weird to ensure the functions were available with the leading `this.`. And I don't think user javascripts tend to call GM functions like that anyway, that polyfill script is just making weird assumptions and then claiming it'll work for "any user script engine". * It tries to provide implementations of GM_registerMenuCommand and GM_getResource text which do unexpected thins or implement a circular dependency on the new version, respectively. |
||
---|---|---|
.. | ||
.eslintignore | ||
.eslintrc.yaml | ||
caret.js | ||
greasemonkey_wrapper.js | ||
history.js | ||
pac_utils.js | ||
position_caret.js | ||
scroll.js | ||
stylesheet.js | ||
webelem.js |