Closed fregante closed 2 years ago
Elements with ids will automatically become globals so this check is truthy even when it shouldn't be:
id
https://github.com/awesome-webextension/webpack-target-webextension/blob/5272fd5070f7d79929f0440d511ab450e620c36b/lib/webpack5/RuntimeModules/ChunkLoaderFallback.js#L21
Gotta love Netscape.
Test URL: https://ghosttext.fregante.com/
Suggested fix: use this or its globalThis-less equivalent:
globalThis
const isModern = typeof globalThis.browser?.runtime?.getURL === 'function'
This check also fails with a simple <script>var browser = "<?php get_browser() ?>"</script> in the <head>
<script>var browser = "<?php get_browser() ?>"</script>
<head>
Elements with
id
s will automatically become globals so this check is truthy even when it shouldn't be:https://github.com/awesome-webextension/webpack-target-webextension/blob/5272fd5070f7d79929f0440d511ab450e620c36b/lib/webpack5/RuntimeModules/ChunkLoaderFallback.js#L21
Gotta love Netscape.
Test URL: https://ghosttext.fregante.com/
Suggested fix: use this or its
globalThis
-less equivalent: