diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-06-08 21:01:39 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-06-08 21:19:20 +0200 |
commit | fa85e855524914531cd23abe89e7292859e82591 (patch) | |
tree | dfdc52b0353e293ebb304924b0d381921a6a1816 /qutebrowser/javascript | |
parent | cfdebbbe232708b1e1e9f4f77746d466a7c7d86e (diff) | |
download | qutebrowser-fa85e855524914531cd23abe89e7292859e82591.tar.gz qutebrowser-fa85e855524914531cd23abe89e7292859e82591.zip |
Add quirk for missing globalThis
globalThis was introduced in Chrome 71:
https://caniuse.com/#feat=mdn-javascript_builtins_globalthis
Since those websites are quite common and we probably want to continue
supporting Qt 5.12 for a bit, let's bite the bullet and add a small polyfill,
because it's trivial.
Fixes #5486
Diffstat (limited to 'qutebrowser/javascript')
-rw-r--r-- | qutebrowser/javascript/globalthis_quirk.user.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qutebrowser/javascript/globalthis_quirk.user.js b/qutebrowser/javascript/globalthis_quirk.user.js new file mode 100644 index 000000000..03e74de3c --- /dev/null +++ b/qutebrowser/javascript/globalthis_quirk.user.js @@ -0,0 +1,9 @@ +// ==UserScript== +// @include https://www.reddit.com/* +// @include https://open.spotify.com/* +// ==/UserScript== + +// Polyfill for a failing globalThis with older Qt versions. + +"use strict"; +window.globalThis = window; |