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

Removed support for "Google Material Icons" in Chromium

This commit is contained in:
nobody
2020-07-12 15:47:30 +02:00
parent de6522534d
commit 3bfa7e7463
2 changed files with 11 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ var requestAnalyzer = {};
requestAnalyzer.isValidCandidate = function (requestDetails, tabDetails) {
let initiatorDomain, isWhitelisted, fontawesome;
let initiatorDomain, isWhitelisted;
initiatorDomain = helpers.extractDomainFromUrl(tabDetails.url, true);
@@ -45,10 +45,15 @@ requestAnalyzer.isValidCandidate = function (requestDetails, tabDetails) {
}
// Font Awesome injections in Chromium deactivated (https://gitlab.com/nobody42/localcdn/-/issues/67)
fontawesome = new RegExp('\(font-awesome|fontawesome)');
if(BrowserType.CHROMIUM && fontawesome.test(requestDetails.url)) {
console.warn('[ LocalCDN ] Font Awesome is not fully supported by your browser.');
return false;
if (BrowserType.CHROMIUM){
if (/(font-awesome|fontawesome)/.test(requestDetails.url)) {
console.warn('[ LocalCDN ] Font Awesome is not fully supported by your browser.');
return false;
} else if (requestDetails.url === 'https://fonts.googleapis.com/icon?family=Material+Icons') {
// also valid for Google Material icons
console.warn('[ LocalCDN ] Google Material Icons are not fully supported by your browser.');
return false;
}
}
// Only requests of type GET can be valid candidates.