diff options
-rw-r--r-- | build.sh | 6 | ||||
-rw-r--r-- | src/content/content.js | 2 | ||||
-rw-r--r-- | src/content/media.js | 2 | ||||
-rw-r--r-- | src/content/webglHook.js | 2 |
4 files changed, 8 insertions, 4 deletions
@@ -44,7 +44,11 @@ if ! grep '"id":' "$MANIFEST_OUT" >/dev/null; then exit 1 fi -sed -re 's/\/\/\s*(.*)\s*\/\/ XPI_ONLY/\1/' $SRC/content/content.js > $BUILD/content/content.js +for file in $SRC/content/*.js; do + if grep -P '\/\/\s(REL|DEV)_ONLY' $file >/dev/null; then + sed -re 's/\s*\/\/\s*(\S.*)\s*\/\/\s*REL_ONLY.*/\1/' -e 's/.*\/\/\s*DEV_ONLY.*//' $file > $BUILD/content/$(basename $file) + fi +done if [ "$1" == "sign" ]; then BUILD_CMD="$BASE/../../we-sign" diff --git a/src/content/content.js b/src/content/content.js index 222cc05..886c363 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -1,6 +1,6 @@ 'use strict'; - // debug = () => {}; // XPI_ONLY + // debug = () => {}; // REL_ONLY var canScript = true, shouldScript = false; diff --git a/src/content/media.js b/src/content/media.js index 5a6827a..ffa67e0 100644 --- a/src/content/media.js +++ b/src/content/media.js @@ -1,5 +1,5 @@ { - debug("Media Hook (blocked %s)", !!window.mediaBlocker, document.URL, document.documentElement && document.documentElement.innerHTML); + debug("Media Hook (blocked %s)", !!window.mediaBlocker, document.URL, document.documentElement && document.documentElement.innerHTML); // DEV_ONLY (() => { let unpatched = new Map(); function patch(obj, methodName, replacement) { diff --git a/src/content/webglHook.js b/src/content/webglHook.js index 171ce59..d4c064a 100644 --- a/src/content/webglHook.js +++ b/src/content/webglHook.js @@ -1,5 +1,5 @@ { - debug("WebGL Hook", document.URL, document.documentElement && document.documentElement.innerHTML); + debug("WebGL Hook", document.URL, document.documentElement && document.documentElement.innerHTML); // DEV_ONLY let proto = HTMLCanvasElement.prototype; let getContext = proto.getContext; exportFunction(function(type, ...rest) { |