mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 04:40:20 +01:00
Typos and linting
This commit is contained in:
parent
f873bd84e5
commit
4a043b2c78
@ -2,7 +2,7 @@ Dieses Add-on ermöglicht es Nutzern, Webseiten davon abzuhalten, sie über die
|
||||
|
||||
Die verschiedenen Blockiermodi sind:
|
||||
<ul>
|
||||
<li>Auslese-API blockieren: Alle Webseiten, die nicht auf der Whitelist oder Blacklist gelistet sind, können die canvas-API zur Darstellung verwenden, aber die Auslese-API darf nicht verwendet werden. Dies kann das korrekte Funktionieren von Webseiten wie z.B. Google Maps verhinden.</li>
|
||||
<li>Auslese-API blockieren: Alle Webseiten, die nicht auf der Whitelist oder Blacklist gelistet sind, können die canvas-API zur Darstellung verwenden, aber die Auslese-API darf nicht verwendet werden. Dies kann das korrekte Funktionieren von Webseiten wie z.B. Google Maps verhindern.</li>
|
||||
<li>Auslese-API vortäuschen: Standardeinstellung und mein Favorit! Alle Webseiten, die nicht auf der Whitelist oder Blacklist gelistet sind, können die canvas-API zur Darstellung verwenden, aber die Auslese-API gibt zufällige Werte zurück, sodass das Fingerprinting immer einen anderen Wert liefert.</li>
|
||||
<li>Bei Ausgabe vortäuschen: Bei der Darstellung von Text werden die beschriebenen Pixel leicht verändert. Dies erschwert die Detektion des Add-ons, aber ist weniger sicher. Bei WebGL-Canvas ist das Verhalten identisch zu "Auslese-API vortäuschen".</li>
|
||||
<li>bei Auslese-API um Erlaubnis fragen: Alle Webseiten, die nicht auf der Whitelist oder Blacklist gelistet sind, können die canvas-API zur Darstellung verwenden, aber der Nutzer wird jedes Mal um Erlaubnis gefragt, wenn die Webseite die Readout-API verwenden möchte.</li>
|
||||
|
25
.vscode/settings.json
vendored
Normal file
25
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"Blockiermodi",
|
||||
"Blockiermodus",
|
||||
"Ignorierliste",
|
||||
"Maleficient",
|
||||
"Nachfrageverweigerungsmodus",
|
||||
"Oakenpants",
|
||||
"PDFs",
|
||||
"Spoofer",
|
||||
"Thorin",
|
||||
"Vortäuschaktion",
|
||||
"Vortäuschgröße",
|
||||
"Vortäuschrate",
|
||||
"Waterfox",
|
||||
"collapser",
|
||||
"fakeable",
|
||||
"fragmenter",
|
||||
"ignorelist",
|
||||
"onloaded",
|
||||
"prefs",
|
||||
"webgl"
|
||||
],
|
||||
"cSpell.language": "en,de"
|
||||
}
|
@ -309,7 +309,7 @@
|
||||
},
|
||||
|
||||
"rng_description": {
|
||||
"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.",
|
||||
"message": "nichts (komplett weiß): es wird immer ein weißes Bild zurückgegeben. Hierbei sollte die Option \"Alpha-Kanal auch vortäuschen\" 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": {
|
||||
@ -680,79 +680,79 @@
|
||||
"description": ""
|
||||
},
|
||||
|
||||
"protectaudio_title": {
|
||||
"protectAudio_title": {
|
||||
"message": "Audio-API beschützen",
|
||||
"description": ""
|
||||
},
|
||||
"protectaudio_description": {
|
||||
"protectAudio_description": {
|
||||
"message": "Ob die Audio-API auch beschützt werden soll.",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_title": {
|
||||
"audioFakeRate_title": {
|
||||
"message": "Buffer Vortäuschrate",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_description": {
|
||||
"audioFakeRate_description": {
|
||||
"message": "Wie viele Werte pro Leseanfrage vorgetäuscht werden sollen.",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.1": {
|
||||
"audioFakeRate_options.1": {
|
||||
"message": "1 Wert",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.10": {
|
||||
"audioFakeRate_options.10": {
|
||||
"message": "10 Werte",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.100": {
|
||||
"audioFakeRate_options.100": {
|
||||
"message": "100 Werte",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.1000": {
|
||||
"audioFakeRate_options.1000": {
|
||||
"message": "1000 Werte",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.0.1%": {
|
||||
"audioFakeRate_options.0.1%": {
|
||||
"message": "0.1% der Werte",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.1%": {
|
||||
"audioFakeRate_options.1%": {
|
||||
"message": "1% der Werte",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.10%": {
|
||||
"audioFakeRate_options.10%": {
|
||||
"message": "10% der Werte",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.100%": {
|
||||
"audioFakeRate_options.100%": {
|
||||
"message": "100% der Werte",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_title": {
|
||||
"audioNoiseLevel_title": {
|
||||
"message": "Rauschlevel",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_description": {
|
||||
"audioNoiseLevel_description": {
|
||||
"message": "",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.minimal": {
|
||||
"audioNoiseLevel_options.minimal": {
|
||||
"message": "minimal",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.low": {
|
||||
"audioNoiseLevel_options.low": {
|
||||
"message": "niedrig",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.medium": {
|
||||
"audioNoiseLevel_options.medium": {
|
||||
"message": "mittel",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.high": {
|
||||
"audioNoiseLevel_options.high": {
|
||||
"message": "hoch",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.maximal": {
|
||||
"audioNoiseLevel_options.maximal": {
|
||||
"message": "maximal",
|
||||
"description": ""
|
||||
},
|
||||
@ -764,19 +764,19 @@
|
||||
"message": "Aktiviert den Audio-Zwischenspeicher. Dies kann die Detektion des Addons verhindern aber reduziert die Geschwindigkeit des Addons.",
|
||||
"description": ""
|
||||
},
|
||||
"audiousefixedindices_title": {
|
||||
"audioUseFixedIndices_title": {
|
||||
"message": "Feste Indizes verwenden",
|
||||
"description": ""
|
||||
},
|
||||
"audiousefixedindices_description": {
|
||||
"audioUseFixedIndices_description": {
|
||||
"message": "Ob einige der Indizes immer vorgetäuscht werden sollen.",
|
||||
"description": ""
|
||||
},
|
||||
"audiofixedindices_title": {
|
||||
"audioFixedIndices_title": {
|
||||
"message": "Feste Indizes",
|
||||
"description": ""
|
||||
},
|
||||
"audiofixedindices_description": {
|
||||
"audioFixedIndices_description": {
|
||||
"message": "Die Indizes, die immer vorgetäuscht werden sollen. Kommasepariert eingeben.",
|
||||
"description": ""
|
||||
},
|
||||
|
@ -169,7 +169,7 @@
|
||||
"description": ""
|
||||
},
|
||||
"askOnlyOnce_description": {
|
||||
"message": "When Canvas Blocker's Block mode is set to 'ask permission' or 'ask permission for readout API', a confirm message will appear every time a page tries to access the API or readout API. This setting tries to display the confirm message only once for each page regardless of how many times the page tries to access the API. Nevertheless, multiple confirm messages may still be displayed on some pages.\nNo: asking every time\nIndividual: each API-type (context, input, readout) has to be confirmed seperately\ncombined: all API-types get confirmed together",
|
||||
"message": "When Canvas Blocker's Block mode is set to 'ask permission' or 'ask permission for readout API', a confirm message will appear every time a page tries to access the API or readout API. This setting tries to display the confirm message only once for each page regardless of how many times the page tries to access the API. Nevertheless, multiple confirm messages may still be displayed on some pages.\nNo: asking every time\nIndividual: each API-type (context, input, readout) has to be confirmed separately\ncombined: all API-types get confirmed together",
|
||||
"description": ""
|
||||
},
|
||||
"askOnlyOnce_options.no": {
|
||||
@ -680,103 +680,103 @@
|
||||
"description": ""
|
||||
},
|
||||
|
||||
"protectaudio_title": {
|
||||
"protectAudio_title": {
|
||||
"message": "Protect audio API",
|
||||
"description": ""
|
||||
},
|
||||
"protectaudio_description": {
|
||||
"protectAudio_description": {
|
||||
"message": "If the audio API should be protected as well",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_title": {
|
||||
"audioFakeRate_title": {
|
||||
"message": "Buffer fake rate",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_description": {
|
||||
"audioFakeRate_description": {
|
||||
"message": "How many of the values per read request should be faked.",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.1": {
|
||||
"audioFakeRate_options.1": {
|
||||
"message": "1 value",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.10": {
|
||||
"audioFakeRate_options.10": {
|
||||
"message": "10 values",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.100": {
|
||||
"audioFakeRate_options.100": {
|
||||
"message": "100 values",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.1000": {
|
||||
"audioFakeRate_options.1000": {
|
||||
"message": "1000 values",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.0.1%": {
|
||||
"audioFakeRate_options.0.1%": {
|
||||
"message": "0.1% of the values",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.1%": {
|
||||
"audioFakeRate_options.1%": {
|
||||
"message": "1% of the values",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.10%": {
|
||||
"audioFakeRate_options.10%": {
|
||||
"message": "10% of the values",
|
||||
"description": ""
|
||||
},
|
||||
"audiofakerate_options.100%": {
|
||||
"audioFakeRate_options.100%": {
|
||||
"message": "100% of the values",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_title": {
|
||||
"audioNoiseLevel_title": {
|
||||
"message": "Noise level",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_description": {
|
||||
"audioNoiseLevel_description": {
|
||||
"message": "",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.minimal": {
|
||||
"audioNoiseLevel_options.minimal": {
|
||||
"message": "minimal",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.low": {
|
||||
"audioNoiseLevel_options.low": {
|
||||
"message": "low",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.medium": {
|
||||
"audioNoiseLevel_options.medium": {
|
||||
"message": "medium",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.high": {
|
||||
"audioNoiseLevel_options.high": {
|
||||
"message": "high",
|
||||
"description": ""
|
||||
},
|
||||
"audionoiselevel_options.maximal": {
|
||||
"audioNoiseLevel_options.maximal": {
|
||||
"message": "maximal",
|
||||
"description": ""
|
||||
},
|
||||
"useaudiocache_title": {
|
||||
"useAudioCache_title": {
|
||||
"message": "Use audio cache",
|
||||
"description": ""
|
||||
},
|
||||
"useaudiocache_description": {
|
||||
"useAudioCache_description": {
|
||||
"message": "Enables the audio cache. This can prevent detection but decreases the performance.",
|
||||
"description": ""
|
||||
},
|
||||
"audiousefixedindices_title": {
|
||||
"audioUseFixedIndices_title": {
|
||||
"message": "Use fixed indices",
|
||||
"description": ""
|
||||
},
|
||||
"audiousefixedindices_description": {
|
||||
"audioUseFixedIndices_description": {
|
||||
"message": "If some of the used indices should be always faked.",
|
||||
"description": ""
|
||||
},
|
||||
"audiofixedindices_title": {
|
||||
"audioFixedIndices_title": {
|
||||
"message": "Fixed indices",
|
||||
"description": ""
|
||||
},
|
||||
"audiofixedindices_description": {
|
||||
"audioFixedIndices_description": {
|
||||
"message": "The indices that are always faked. Enter separated by comma.",
|
||||
"description": ""
|
||||
},
|
||||
|
@ -50,7 +50,7 @@
|
||||
setHeader(headers, {
|
||||
name: "Content-Security-Policy",
|
||||
value: `object-src ${cspMatch}; frame-src ${cspMatch}`
|
||||
// + "; report-to https://canvasblocker.invalid/; report-uri https://canvasblocker.invalid/"
|
||||
// + "; report-to https://canvasblocker.invalid/; report-uri https://canvasblocker.invalid/"
|
||||
});
|
||||
}
|
||||
return {
|
||||
|
@ -108,7 +108,7 @@
|
||||
"contentWindow",
|
||||
{
|
||||
enumerable: true,
|
||||
configureable: true,
|
||||
configurable: true,
|
||||
get: exportFunction(function(){
|
||||
var window = oldContentWindowGetter.call(this);
|
||||
if (window){
|
||||
@ -124,7 +124,7 @@
|
||||
"contentDocument",
|
||||
{
|
||||
enumerable: true,
|
||||
configureable: true,
|
||||
configurable: true,
|
||||
get: exportFunction(function(){
|
||||
var document = oldContentDocumentGetter.call(this);
|
||||
if (document){
|
||||
|
@ -66,7 +66,7 @@
|
||||
scope.intercept({subject: window}, apis);
|
||||
}
|
||||
else {
|
||||
logging.message("settings not loaded -> need to pre intercep");
|
||||
logging.message("settings not loaded -> need to pre intercept");
|
||||
let forceLoad = true;
|
||||
let preIntercepted = false;
|
||||
let intercepted = false;
|
||||
@ -97,7 +97,7 @@
|
||||
name,
|
||||
{
|
||||
enumerable: true,
|
||||
configureable: true,
|
||||
configurable: true,
|
||||
get: exportFunction(function(){
|
||||
if (forceLoad){
|
||||
logging.warning("force load the settings. Calling stack:", (new Error()).stack);
|
||||
|
@ -86,7 +86,7 @@
|
||||
"fillText", "strokeText",
|
||||
{name: "webGL", level: 2},
|
||||
"readPixels",
|
||||
{name: "Audio-API", leve: 1},
|
||||
{name: "Audio-API", level: 1},
|
||||
"getFloatFrequencyData", "getByteFrequencyData", "getFloatTimeDomainData", "getByteTimeDomainData",
|
||||
"getChannelData", "copyFromChannel",
|
||||
"getFrequencyResponse"
|
||||
|
@ -376,7 +376,7 @@
|
||||
return foundDefinition.set(...args);
|
||||
}
|
||||
else {
|
||||
logging.error("Try to set unkown setting:", name);
|
||||
logging.error("Try to set unknown setting:", name);
|
||||
}
|
||||
};
|
||||
scope.get = function(name, ...args){
|
||||
@ -385,7 +385,7 @@
|
||||
return foundDefinition.get(...args);
|
||||
}
|
||||
else {
|
||||
logging.error("Try to get unkown setting:", name);
|
||||
logging.error("Try to get unknown setting:", name);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* eslint max-lines: off*/
|
||||
(function(){
|
||||
"use strict";
|
||||
var settingsDisplay = [
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
DomainNotification.prototype.node = function node(){
|
||||
const node = document.createElement("li");
|
||||
node.className = "domainPrints collapsable collapsed";
|
||||
node.className = "domainPrints collapsible collapsed";
|
||||
node.appendChild(this.textNode());
|
||||
node.appendChild(document.createElement("br"));
|
||||
createCollapser(node);
|
||||
|
@ -30,7 +30,7 @@
|
||||
collapser.addEventListener("click", function(){
|
||||
container.classList.toggle("collapsed");
|
||||
});
|
||||
container.classList.add("collapsable");
|
||||
container.classList.add("collapsible");
|
||||
container.classList.add("collapsed");
|
||||
};
|
||||
}();
|
||||
|
@ -25,7 +25,7 @@
|
||||
node.appendChild(document.createTextNode(this.timestamp.toLocaleString() + ": "));
|
||||
node.appendChild(this.textNode());
|
||||
if (this.dataURL){
|
||||
node.className = "notification collapsable collapsed";
|
||||
node.className = "notification collapsible collapsed";
|
||||
node.appendChild(document.createElement("br"));
|
||||
createCollapser(node);
|
||||
const img = document.createElement("img");
|
||||
|
@ -84,40 +84,40 @@ button.action img {
|
||||
padding: 0 0 20px 1em;
|
||||
}
|
||||
|
||||
.collapsable {
|
||||
.collapsible {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
}
|
||||
.collapsable.collapsed .collapser {
|
||||
.collapsible.collapsed .collapser {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.collapsable .collapser {
|
||||
.collapsible .collapser {
|
||||
cursor: pointer;
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.collapsable .collapser .more {
|
||||
.collapsible .collapser .more {
|
||||
display: none;
|
||||
}
|
||||
.collapsable.collapsed .collapser .more {
|
||||
.collapsible.collapsed .collapser .more {
|
||||
display: inline;
|
||||
}
|
||||
.collapsable.collapsed .collapser .less {
|
||||
.collapsible.collapsed .collapser .less {
|
||||
display: none;
|
||||
}
|
||||
.collapsable .collapser .less {
|
||||
.collapsible .collapser .less {
|
||||
display: inline;
|
||||
}
|
||||
.collapsable.collapsed .collapsing {
|
||||
.collapsible.collapsed .collapsing {
|
||||
height: 0px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
.collapsable .collapsing {
|
||||
.collapsible .collapsing {
|
||||
height: initial;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
@ -280,7 +280,7 @@ Version 0.4.0:
|
||||
|
||||
fixes:
|
||||
- ask mode did not work for input types
|
||||
- allow page scripts to overwrite the faked funtions
|
||||
- allow page scripts to overwrite the faked functions
|
||||
- getImageData also faked when using fakeInput mode
|
||||
|
||||
Version 0.3.8:
|
||||
|
@ -39,11 +39,11 @@
|
||||
// Start audio processing
|
||||
pxi_oscillator.start(0);
|
||||
context.startRendering();
|
||||
context.oncomplete = function(evnt) {
|
||||
context.oncomplete = function(event) {
|
||||
var str = "";
|
||||
var copyTest = new Float32Array(44100);
|
||||
evnt.renderedBuffer.copyFromChannel(copyTest, 0);
|
||||
var getTest = evnt.renderedBuffer.getChannelData(0);
|
||||
event.renderedBuffer.copyFromChannel(copyTest, 0);
|
||||
var getTest = event.renderedBuffer.getChannelData(0);
|
||||
Promise.all([
|
||||
crypto.subtle.digest("SHA-256", getTest),
|
||||
crypto.subtle.digest("SHA-256", copyTest),
|
||||
|
Loading…
x
Reference in New Issue
Block a user