Extended the method to get domainlist (#1)

This commit is contained in:
nobody 2020-05-25 22:53:29 +02:00
parent 82993423e9
commit a35f41cc32
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
1 changed files with 8 additions and 3 deletions

View File

@ -281,14 +281,19 @@ stateManager._removeIconBadgeFromTab = function (tab) {
stateManager._clearBadgeText(tab.id);
};
stateManager._domainIsWhitelisted = function (domain) {
stateManager._domainIsWhitelisted = function (domain, listname = "") {
if (domain !== null) {
let whitelistRecord, isWhitelisted;
whitelistRecord = requestAnalyzer.whitelistedDomains[domain];
isWhitelisted = Boolean(whitelistRecord);
if (listname === "manipulate-dom") {
whitelistRecord = requestAnalyzer.manipulateDOMDomains[domain];
isWhitelisted = Boolean(whitelistRecord);
} else {
whitelistRecord = requestAnalyzer.whitelistedDomains[domain];
isWhitelisted = Boolean(whitelistRecord);
}
return isWhitelisted;
}