1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Add {newline} to parseTranslation

This commit is contained in:
kkapsner 2024-12-22 00:25:00 +01:00
parent d9af05599c
commit c776ce9e04
3 changed files with 6 additions and 5 deletions

View File

@ -1675,7 +1675,7 @@
"description": "" "description": ""
}, },
"whitelist_inspection_description": { "whitelist_inspection_description": {
"message": "This shows which fingerprint protections are active for specified sites.\n\nUnchecked means that the site can use that particular function in an unaltered manner. This includes it could use it to (partially) fingerprint your browser.\nChecked means that CanvasBlocker provides a protection which makes it harder for the site to uniquely identifying you.", "message": "This shows which fingerprint protections are active for specified sites.{newline}{newline}Unchecked means that the site can use that particular function in an unaltered manner. This includes it could use it to (partially) fingerprint your browser.{newline}Checked means that CanvasBlocker provides a protection which makes it harder for the site to uniquely identifying you.",
"description": "" "description": ""
}, },
"whitelist_all_apis": { "whitelist_all_apis": {

View File

@ -50,6 +50,10 @@
container.appendChild(link); container.appendChild(link);
break; break;
} }
case "newline": {
container.appendChild(document.createElement("br"));
break;
}
default: default:
if (parameters[args[0]]){ if (parameters[args[0]]){
const parameter = parameters[args[0]]; const parameter = parameters[args[0]];

View File

@ -20,10 +20,7 @@
const description = document.createElement("div"); const description = document.createElement("div");
description.className = "description"; description.className = "description";
extension.getTranslation("whitelist_inspection_description").split(/(\n)/g).forEach(function(line){ description.appendChild(extension.parseTranslation(extension.getTranslation("whitelist_inspection_description")));
const node = line === "\n"? document.createElement("br"): document.createTextNode(line);
description.appendChild(node);
});
document.body.appendChild(description); document.body.appendChild(description);