Compare commits
2 Commits
f785cd77b9
...
0f4464cb3a
Author | SHA1 | Date |
---|---|---|
nobody | 0f4464cb3a | |
nobody | 2efaf25bb6 |
|
@ -1373,6 +1373,8 @@ https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min
|
|||
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.bundle.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.1/css/bootstrap.min.css
|
||||
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.1/js/bootstrap.bundle.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css
|
||||
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/js/bootstrap.bundle.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.3/css/bootstrap.min.css
|
||||
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.3/js/bootstrap.bundle.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/twix.js/0.3.0/twix.min.js
|
||||
|
|
|
@ -96,15 +96,19 @@ stateManager.addDomainToAllowlist = function (domain) {
|
|||
|
||||
stateManager.removeDomainFromAllowlist = function (domain) {
|
||||
return new Promise((resolve) => {
|
||||
let allowlistedDomains, wildcard;
|
||||
let allowlistedDomains;
|
||||
|
||||
allowlistedDomains = requestAnalyzer.allowlistedDomains;
|
||||
wildcard = helpers.getWildcard(domain);
|
||||
|
||||
if (allowlistedDomains[domain]) {
|
||||
delete allowlistedDomains[domain];
|
||||
} else {
|
||||
delete allowlistedDomains[wildcard];
|
||||
for (const key in allowlistedDomains) {
|
||||
if (key.startsWith('*.') && domain.endsWith(key.substring(2))) {
|
||||
delete allowlistedDomains[key];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
storageManager.type.set({allowlistedDomains}, resolve);
|
||||
|
|
|
@ -185,23 +185,29 @@ helpers.getTopLevelDomain = function (initiatorDomain) {
|
|||
};
|
||||
|
||||
helpers.checkAllowlisted = function (domain, list) {
|
||||
let domainWithoutPrefix, wildcard, tld;
|
||||
if (!domain) return false;
|
||||
|
||||
if (domain === null) {
|
||||
const subdomains = helpers.getAllSubdomains(domain);
|
||||
|
||||
for (const subdomain of subdomains) {
|
||||
if (list[subdomain]) return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
helpers.getAllSubdomains = function (domain) {
|
||||
const parts = domain.split('.').reverse();
|
||||
const subdomains = [];
|
||||
let currentSubdomain = '';
|
||||
|
||||
for (const part of parts) {
|
||||
currentSubdomain = part + (currentSubdomain ? `.${currentSubdomain}` : '');
|
||||
subdomains.push(`*.${currentSubdomain}`);
|
||||
subdomains.push(currentSubdomain);
|
||||
}
|
||||
|
||||
if (domain.startsWith(Address.WWW_PREFIX)) {
|
||||
domainWithoutPrefix = domain.slice(Address.WWW_PREFIX.length);
|
||||
}
|
||||
wildcard = helpers.getWildcard(domain);
|
||||
tld = helpers.getTopLevelDomain(domain);
|
||||
|
||||
return Boolean(list[domain] ||
|
||||
list[domainWithoutPrefix] ||
|
||||
list[wildcard] ||
|
||||
list[domainWithoutPrefix] ||
|
||||
list[tld]);
|
||||
return subdomains;
|
||||
};
|
||||
|
||||
helpers.extractFilenameFromPath = function (path) {
|
||||
|
|
|
@ -464,7 +464,10 @@ targets.setLastVersion = function (type, version) {
|
|||
if (helpers.compareVersion('4.4.1', version)) return '4.4.1'; // <= 4.4.1
|
||||
return '4.6.1';
|
||||
}
|
||||
if (type.startsWith('/twitter-bootstrap/5.')) return '5.3.3';
|
||||
if (type.startsWith('/twitter-bootstrap/5.')) {
|
||||
if (helpers.compareVersion('5.1.3', version)) return '5.1.3'; // <= 5.1.3
|
||||
return '5.3.3';
|
||||
}
|
||||
if (type.startsWith('/twix.js/0.')) return '0.3.0';
|
||||
if (type.startsWith('/twix.js/1.')) return '1.3.0';
|
||||
if (type.startsWith('/underscore.js/1.')) return '1.13.6';
|
||||
|
|
|
@ -25,9 +25,13 @@
|
|||
<h2>New in LocalCDN:</h2>
|
||||
</div>
|
||||
<div class="release-notes-area">
|
||||
<p></p>
|
||||
<p>Added</p>
|
||||
<ul>
|
||||
<li></li>
|
||||
<li>twitter-bootstrap v5.1.3 (<a href="https://codeberg.org/nobody/LocalCDN/issues/1624">#1624</a>)</li>
|
||||
</ul>
|
||||
<p>Improved</p>
|
||||
<ul>
|
||||
<li>Wildcard support extended in all lists (<a href="https://codeberg.org/nobody/LocalCDN/issues/1622">#1622</a>)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="generator-section">
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,4 @@
|
|||
In this directory the file was renamed.
|
||||
|
||||
Original: bootstrap.bundle.min.js
|
||||
Now: bootstrap.min.jsm
|
Loading…
Reference in New Issue