diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 06ad26a..8caa673 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -188,7 +188,7 @@ }, "rng_description": { - "message": "nicht persistent: die Zufallszahlen werden bei jeder Vortäuschaktion neu bestimmt.\nkonstant: innerhalb einer Webseite wird eine Farbe immer gleich verändert.\npersistent: für jede Domain werden die Zufallszahlen nur einmal bestimmt.", + "message": "nichts (komplett weiß): es wird immer ein weißes Bild zurückgegeben. Hierbei sollte die Option \"Alpha-Kanal auch vortäuchen\" aktiviert werden. ACHTUNG: Nicht im Modus \"Bei Ausgabe vortäuschen\" verwenden.\nnicht persistent: die Zufallszahlen werden bei jeder Vortäuschaktion neu bestimmt.\nkonstant: innerhalb einer Webseite wird eine Farbe immer gleich verändert.\npersistent: für jede Domain werden die Zufallszahlen nur einmal bestimmt.", "description": "" }, "rng_options.persistent": { @@ -203,6 +203,10 @@ "message": "nicht persistent", "description": "" }, + "rng_options.white": { + "message": "nichts (komplett weiß)", + "description": "" + }, "rng_title": { "message": "Zufallszahlengenerator", "description": "" diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 1917986..7cdf3ca 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -188,7 +188,7 @@ }, "rng_description": { - "message": "non persistent: the random numbers will be determined freshly for each faking action.\nconstant: within one web page a color will always be faked to the same color.\npersistent: the random number will only be determined once for every domain.", + "message": "none (completely white): a completely white image is returned. The option \"Fake the alpha channel\" should be activated with this. CAUTION: Do not use this with the \"fake at input\" mode.\nnon persistent: the random numbers will be determined freshly for each faking action.\nconstant: within one web page a color will always be faked to the same color.\npersistent: the random number will only be determined once for every domain.", "description": "" }, "rng_options.persistent": { @@ -203,6 +203,10 @@ "message": "non persistent", "description": "" }, + "rng_options.white": { + "message": "none (completely white)", + "description": "" + }, "rng_title": { "message": "Random number generator", "description": "" diff --git a/lib/intercept.js b/lib/intercept.js index ab9e148..5755e85 100644 --- a/lib/intercept.js +++ b/lib/intercept.js @@ -29,6 +29,9 @@ case "constant": setRandomSupply(randomSupplies.constant); break; + case "white": + setRandomSupply(randomSupplies.white); + break; default: setRandomSupply(randomSupplies.nonPersistent); } diff --git a/lib/randomSupplies.js b/lib/randomSupplies.js index 5e97656..3c6085c 100644 --- a/lib/randomSupplies.js +++ b/lib/randomSupplies.js @@ -186,4 +186,18 @@ }; } }; + + scope.white = { + name: "white", + getRng: function(){ + return function(){ + return 255; + }; + }, + getPixelRng: function(){ + return function(){ + return [255, 255, 255, 255]; + }; + } + }; }()); \ No newline at end of file diff --git a/lib/settingDefinitions.js b/lib/settingDefinitions.js index 7bd92a5..45bc530 100644 --- a/lib/settingDefinitions.js +++ b/lib/settingDefinitions.js @@ -37,7 +37,7 @@ { name: "rng", defaultValue: "nonPersistent", - options: ["nonPersistent", "constant", "persistent"] + options: ["white", "nonPersistent", "constant", "persistent"] }, { name: "useCanvasCache", diff --git a/releaseNotes.txt b/releaseNotes.txt index a913079..3a6d569 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -6,10 +6,12 @@ Version 0.4.3: - new features: - - + - reset settings + - new white random generator - creates output similar to Tor browser fixes: - page action was not always showing + - waiting for settings created error messages in browser console Version 0.4.2 new features: diff --git a/test/test.js b/test/test.js index e0b5244..a77c962 100644 --- a/test/test.js +++ b/test/test.js @@ -3,7 +3,9 @@ "use strict"; function show(container, url){ - container.querySelector(".display").src = url; + var display = container.querySelector(".display"); + display.src = url; + display.title = url; var buffer = new TextEncoder("utf-8").encode(url); crypto.subtle.digest("SHA-256", buffer).then(function(hash){ var chunks = [];