mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2024-12-21 23:53:55 +01:00
Method domainIsWhitelisted renamed to domainIsListed
This commit is contained in:
parent
76c7708a27
commit
a1a4a1c69e
@ -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') {
|
||||
|
||||
|
@ -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) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user