Open Cazka opened 2 years ago
we could also overwrite window to unsafeWindow at the start of the userscript.
if("undefined" != typeof unsafeWindow) {
//trust me bro
window = unsafeWindow;
}
this actually works
we could also overwrite window to unsafeWindow at the start of the userscript.
if("undefined" != typeof unsafeWindow) { //trust me bro window = unsafeWindow; }
this actually works
seems to be fixed in a new tampermonkey version
We are using the variable
_window
instead ofwindow
to reference the global object.Using this one liner, we make sure that
_window
is referencing the real global object.const _window = 'undefined' == typeof unsafeWindow ? window : unsafeWindow;
Problem is that this one liner is not included in the library and have to be placed manually.
Is it possible to include that one liner in the src folder so that it is included in the built library?