aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-08-18 17:51:39 +0200
committerWojtek Kosior <koszko@koszko.org>2021-08-18 17:51:51 +0200
commit0bbda8fceb52f28032460db0331b09ad086a2a64 (patch)
treeccf1b72c60545e706fac21167fa480d5fa74e327
parent443bc095a72949adb4a007c9a19a43da7dd8843d (diff)
downloadbrowser-extension-0bbda8fceb52f28032460db0331b09ad086a2a64.tar.gz
browser-extension-0bbda8fceb52f28032460db0331b09ad086a2a64.zip
enhance our bundler to protect top-level `this' from accidental clobbering
-rwxr-xr-xbuild.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 675dc2c..941ce1e 100755
--- a/build.sh
+++ b/build.sh
@@ -246,7 +246,7 @@ s^_CONTENTSCRIPTS_^$CONTENTSCRIPTS^" \
(echo "\
\"use strict\";
-(() => {
+({fun: (function() {
$(map_get IMPORTCODES $FILEKEY)
";
@@ -262,7 +262,7 @@ fi
echo "
$(map_get EXPORTCODES $FILEKEY)
-})();") > $BUILDDIR/$FILE
+})}).fun();") > $BUILDDIR/$FILE
fi
done