diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -267,9 +267,24 @@ $(map_get EXPORTCODES $FILEKEY) done if [ "$BROWSER" = "chromium" ]; then - echo "window.killtheweb={is_chrome: true, browser: window.chrome};" > $BUILDDIR/exports_init.js + cat > $BUILDDIR/exports_init.js <<EOF +window.killtheweb={is_chrome: true, browser: window.chrome}; +EOF else - echo "window.killtheweb={is_mozilla: true, browser: this.browser};" > $BUILDDIR/exports_init.js + cat > $BUILDDIR/exports_init.js <<EOF +/* Polyfill for IceCat 60. */ +String.prototype.matchAll = String.prototype.matchAll || function(regex) { + if (regex.flags.search("g") === -1) + throw new TypeError("String.prototype.matchAll called with a non-global RegExp argument"); + + for (const matches = [];;) { + if (matches[matches.push(regex.exec(this)) - 1] === null) + return matches.splice(0, matches.length - 1); + } +} + +window.killtheweb={is_mozilla: true, browser: this.browser}; +EOF fi cp -r copyright licenses/ $BUILDDIR |