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

Method domainIsWhitelisted renamed to domainIsListed

This commit is contained in:
nobody 2020-05-26 20:26:15 +02:00
parent 76c7708a27
commit a1a4a1c69e
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
2 changed files with 4 additions and 6 deletions

View File

@ -30,11 +30,9 @@ manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) {
let initiatorDomain, listedToManipulateDOM;
listedToManipulateDOM = stateManager._domainIsWhitelisted(initiatorDomain, "manipulate-dom");
listedToManipulateDOM = stateManager._domainIsListed(initiatorDomain, "manipulate-dom");
initiatorDomain = helpers.extractDomainFromUrl(details.url, true) || Address.EXAMPLE;
// by Jaap (https://gitlab.com/Jaaap)
let header = details.responseHeaders.find(h => h.name.toLowerCase() === 'content-type');
@ -43,7 +41,7 @@ manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) {
let mimeType, isWhitelisted;
mimeType = header.value.replace(/;.*/, '').toLowerCase();
isWhitelisted = stateManager._domainIsWhitelisted(initiatorDomain);
isWhitelisted = stateManager._domainIsListed(initiatorDomain);
if (!isWhitelisted && mimeType === 'text/html') {

View File

@ -194,7 +194,7 @@ stateManager._updateTab = function (details) {
let tabDomain, domainIsWhitelisted, frameIdentifier, tabIdentifier;
tabDomain = helpers.extractDomainFromUrl(details.url, true);
domainIsWhitelisted = stateManager._domainIsWhitelisted(tabDomain);
domainIsWhitelisted = stateManager._domainIsListed(tabDomain);
frameIdentifier = details.frameId;
tabIdentifier = details.tabId;
@ -281,7 +281,7 @@ stateManager._removeIconBadgeFromTab = function (tab) {
stateManager._clearBadgeText(tab.id);
};
stateManager._domainIsWhitelisted = function (domain, listname = "") {
stateManager._domainIsListed = function (domain, listname = "") {
if (domain !== null) {