1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2024-12-22 16:12:13 +01:00

Fixed: Keep 'Tweak HTML source code' enabled after browser restart (#15)

This commit is contained in:
nobody 2020-06-05 07:28:26 +02:00
parent 10b6b35775
commit 40092dffc9
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
4 changed files with 7 additions and 6 deletions

View File

@ -64,7 +64,7 @@ messenger._handleMessageReceived = function (message, sender, sendResponse) {
if (topic === 'domain:fetch-is-manipulateDOM') {
let manipulateDOMRecord = requestAnalyzer.domainsManipulateDOMlist[value];
let manipulateDOMRecord = requestAnalyzer.domainsManipulateDOM[value];
sendResponse({'value': Boolean(manipulateDOMRecord)});
return MessageResponse.SYNCHRONOUS;

View File

@ -175,7 +175,7 @@ requestAnalyzer._applyWhitelistedDomains = function () {
requestAnalyzer._applyManipulateDOMDomains = function () {
chrome.storage.local.get(Setting.DOMAINS_MANIPULATE_DOM, function (items) {
requestAnalyzer.manipulateDOMDomains = items.domainsManipulateDOM || {};
requestAnalyzer.domainsManipulateDOM = items.domainsManipulateDOM || {};
});
};
@ -186,7 +186,7 @@ requestAnalyzer._applyManipulateDOMDomains = function () {
requestAnalyzer.whitelistedDomains = {};
requestAnalyzer._applyWhitelistedDomains();
requestAnalyzer.domainsManipulateDOMlist = {};
requestAnalyzer.domainsManipulateDOM = {};
requestAnalyzer._applyManipulateDOMDomains();
/**
* Event Handlers

View File

@ -139,7 +139,7 @@ stateManager.addDomainToManipulateDOMlist = function (domain) {
return new Promise((resolve) => {
let domainsManipulateDOM = requestAnalyzer.domainsManipulateDOMlist;
let domainsManipulateDOM = requestAnalyzer.domainsManipulateDOM;
domainsManipulateDOM[domain] = true;
chrome.storage.local.set({domainsManipulateDOM}, resolve);
@ -150,7 +150,7 @@ stateManager.removeDomainFromManipulateDOMlist = function (domain) {
return new Promise((resolve) => {
let domainsManipulateDOM = requestAnalyzer.domainsManipulateDOMlist;
let domainsManipulateDOM = requestAnalyzer.domainsManipulateDOM;
delete domainsManipulateDOM[domain];
chrome.storage.local.set({domainsManipulateDOM}, resolve);
@ -288,7 +288,7 @@ stateManager._domainIsListed = function (domain, listname) {
let whitelistRecord, isWhitelisted;
if (listname === "manipulate-dom") {
whitelistRecord = requestAnalyzer.manipulateDOMDomains[domain];
whitelistRecord = requestAnalyzer.domainsManipulateDOM[domain];
isWhitelisted = Boolean(whitelistRecord);
} else {
whitelistRecord = requestAnalyzer.whitelistedDomains[domain];

View File

@ -31,6 +31,7 @@
<li>Added note about missing translation in popup</li>
<li>Toggle for manipulate DOM removed for Chromium (not supported by Chromium)</li>
<li>Donation methods updated (+Bitcoin, +Ether)</li>
<li>Fixed: Keep 'Tweak HTML source code' enabled after browser restart (<a href="https://codeberg.org/nobody/LocalCDN/issues/15">#15</a>)</li>
</ul>
<div class="topic-label">
Please update your uBlock/uMatrix rules