Revision 3d0efa15
Added by koszko about 2 years ago
build.sh | ||
---|---|---|
267 | 267 |
done |
268 | 268 |
|
269 | 269 |
if [ "$BROWSER" = "chromium" ]; then |
270 |
echo "window.killtheweb={is_chrome: true, browser: window.chrome};" > $BUILDDIR/exports_init.js |
|
270 |
cat > $BUILDDIR/exports_init.js <<EOF |
|
271 |
window.killtheweb={is_chrome: true, browser: window.chrome}; |
|
272 |
EOF |
|
271 | 273 |
else |
272 |
echo "window.killtheweb={is_mozilla: true, browser: this.browser};" > $BUILDDIR/exports_init.js |
|
274 |
cat > $BUILDDIR/exports_init.js <<EOF |
|
275 |
/* Polyfill for IceCat 60. */ |
|
276 |
String.prototype.matchAll = String.prototype.matchAll || function(regex) { |
|
277 |
if (regex.flags.search("g") === -1) |
|
278 |
throw new TypeError("String.prototype.matchAll called with a non-global RegExp argument"); |
|
279 |
|
|
280 |
for (const matches = [];;) { |
|
281 |
if (matches[matches.push(regex.exec(this)) - 1] === null) |
|
282 |
return matches.splice(0, matches.length - 1); |
|
283 |
} |
|
284 |
} |
|
285 |
|
|
286 |
window.killtheweb={is_mozilla: true, browser: this.browser}; |
|
287 |
EOF |
|
273 | 288 |
fi |
274 | 289 |
|
275 | 290 |
cp -r copyright licenses/ $BUILDDIR |
Also available in: Unified diff
remove unneeded policy-related cosole messages; restore IceCat 60 compatibility