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
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
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.

View File

@ -33,6 +33,7 @@
<li>Added: Jets.js v0.14.1 (<a href="https://codeberg.org/nobody/LocalCDN/issues/56">#56</a>)</li>
<li>Added: Vanilla-Lazyload v17.1.0 (<a href="https://codeberg.org/nobody/LocalCDN/issues/56">#56</a>)</li>
<li>Fixed: Blocking handling of "Google Fonts" improved</li>
<li>Removed: Support for "Google Material Icons" in Chromium (known Chromium bug, same with "Font Awesome")</li>
</ul>
<div class="topic-label">
Generate rule sets for uBlock or uMatrix