NoScript Options/Appearance/Show synthetic placeholders for invisible capability probes (issue #369).
This commit is contained in:
parent
1dfc0af974
commit
d7ccea2185
|
@ -155,6 +155,9 @@
|
||||||
"ShowFullAddresses": {
|
"ShowFullAddresses": {
|
||||||
"message": "List full addresses in the permissions popup (https://www.noscript.net)"
|
"message": "List full addresses in the permissions popup (https://www.noscript.net)"
|
||||||
},
|
},
|
||||||
|
"ShowProbePlaceholders": {
|
||||||
|
"message": "Show synthetic placeholders for invisible capability probes"
|
||||||
|
},
|
||||||
"SectionGeneral": {
|
"SectionGeneral": {
|
||||||
"message": "General"
|
"message": "General"
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,6 +28,7 @@ var Defaults = {
|
||||||
showCtxMenuItem: true,
|
showCtxMenuItem: true,
|
||||||
showCountBadge: true,
|
showCountBadge: true,
|
||||||
showFullAddresses: false,
|
showFullAddresses: false,
|
||||||
|
showProbePlaceholders: true,
|
||||||
amnesticUpdates: false,
|
amnesticUpdates: false,
|
||||||
},
|
},
|
||||||
sync: {
|
sync: {
|
||||||
|
|
|
@ -230,9 +230,13 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getTheme(msg, {tab, frameId}) {
|
async getTheme(msg, {tab, frameId}) {
|
||||||
|
let code = await Themes.getContentCSS();
|
||||||
|
if (!ns.local.showProbePlaceholders) {
|
||||||
|
code += `\n.__NoScript_Offscreen_PlaceHolders__ {display: none }`;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
browser.tabs.insertCSS(tab.id, {
|
browser.tabs.insertCSS(tab.id, {
|
||||||
code: await Themes.getContentCSS(),
|
code,
|
||||||
frameId,
|
frameId,
|
||||||
runAt: "document_start",
|
runAt: "document_start",
|
||||||
matchAboutBlank: true,
|
matchAboutBlank: true,
|
||||||
|
|
|
@ -108,6 +108,12 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<label for="opt-showFullAddresses" id="lbl-showFullAddresses">__MSG_ShowFullAddresses__</label>
|
<label for="opt-showFullAddresses" id="lbl-showFullAddresses">__MSG_ShowFullAddresses__</label>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="opt-group">
|
||||||
|
<span id="showProbePlaceholders-opt">
|
||||||
|
<input type="checkbox" id="opt-showProbePlaceholders">
|
||||||
|
<label for="opt-showProbePlaceholders" id="lbl-showProbePlaceholders">__MSG_showProbePlaceholders__</label>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<section id="sect-themes">
|
<section id="sect-themes">
|
||||||
<fieldset id="themes">
|
<fieldset id="themes">
|
||||||
<legend>__MSG_settingsThemeLabel__</legend>
|
<legend>__MSG_settingsThemeLabel__</legend>
|
||||||
|
|
|
@ -154,6 +154,7 @@ document.querySelector("#version").textContent = _("Version",
|
||||||
opt("showCountBadge", "local");
|
opt("showCountBadge", "local");
|
||||||
opt("showCtxMenuItem", "local");
|
opt("showCtxMenuItem", "local");
|
||||||
opt("showFullAddresses", "local");
|
opt("showFullAddresses", "local");
|
||||||
|
opt("showProbePlaceholders", "local");
|
||||||
|
|
||||||
UI.wireChoice("theme", o => Themes.setup(o && o.value) );
|
UI.wireChoice("theme", o => Themes.setup(o && o.value) );
|
||||||
opt("vintageTheme", async o => await (o ? Themes.setVintage(o.checked) : Themes.isVintage()));
|
opt("vintageTheme", async o => await (o ? Themes.setVintage(o.checked) : Themes.isVintage()));
|
||||||
|
|
Loading…
Reference in New Issue