1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Fixed: UI integration (#233)

This commit is contained in:
nobody
2021-01-17 09:52:49 +01:00
parent 784dc29316
commit f4be2cbf43
5 changed files with 30 additions and 16 deletions

View File

@@ -91,8 +91,16 @@ stateManager.removeDomainFromAllowlist = function (domain) {
return new Promise((resolve) => {
let allowlistedDomains = requestAnalyzer.allowlistedDomains;
delete allowlistedDomains[domain];
let allowlistedDomains, wildcard;
allowlistedDomains = requestAnalyzer.allowlistedDomains;
wildcard = helpers.getWildcard(domain);
if (allowlistedDomains[domain]) {
delete allowlistedDomains[domain];
} else {
delete allowlistedDomains[wildcard];
}
storageManager.type.set({allowlistedDomains}, resolve);
});
@@ -239,7 +247,6 @@ stateManager._removeIconBadgeFromTab = function (tab) {
};
stateManager._domainIsListed = function (domain, listname) {
if (domain !== null) {
let allowlistRecord, isAllowlisted;
@@ -248,7 +255,7 @@ stateManager._domainIsListed = function (domain, listname) {
allowlistRecord = requestAnalyzer.domainsManipulateDOM[domain];
isAllowlisted = Boolean(allowlistRecord);
} else {
allowlistRecord = requestAnalyzer.allowlistedDomains[domain];
allowlistRecord = requestAnalyzer.allowlistedDomains[domain] || requestAnalyzer.allowlistedDomains[helpers.getWildcard(domain)];
isAllowlisted = Boolean(allowlistRecord);
}