mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-02-02 12:27:27 +01:00
Font Awesome injections in Chromium deactivated (Fixed #67)
This commit is contained in:
parent
54ce5e25d1
commit
99bbe96279
@ -88,3 +88,7 @@ const Whitelist = {
|
||||
'TRIM_EXPRESSION': /^;+|;+$/g,
|
||||
'VALUE_SEPARATOR': ';'
|
||||
};
|
||||
|
||||
const BrowserType = {
|
||||
'CHROMIUM': chrome.runtime.getURL("/").startsWith("chrome-extension")
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ var requestAnalyzer = {};
|
||||
requestAnalyzer.isValidCandidate = function (requestDetails, tabDetails) {
|
||||
|
||||
let initiatorDomain, isWhitelisted;
|
||||
let fontawesome = new RegExp('\(font-awesome|fontawesome)');
|
||||
|
||||
initiatorDomain = helpers.extractDomainFromUrl(tabDetails.url, true);
|
||||
|
||||
@ -43,6 +44,12 @@ requestAnalyzer.isValidCandidate = function (requestDetails, tabDetails) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Font Awesome injections in Chromium deactivated (https://gitlab.com/nobody42/localcdn/-/issues/67)
|
||||
if(BrowserType.CHROMIUM && fontawesome.test(requestDetails.url)) {
|
||||
console.warn('[ LocalCDN ] Font Awesome is not fully supported by your browser.');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only requests of type GET can be valid candidates.
|
||||
return requestDetails.method === WebRequest.GET;
|
||||
};
|
||||
|
@ -27,6 +27,7 @@
|
||||
<li>Remove crossorigin and integrity attributes (<a href="https://gitlab.com/nobody42/localcdn/-/issues/66">#66</a>) [experimental]</li>
|
||||
<li>Added React and ReactDOM v16.13.1 (Fixed <a href="https://gitlab.com/nobody42/localcdn/-/issues/70">#70</a>)</li>
|
||||
<li>Added jQuery-csv v1.0.9, jQuery Ajax AutoComplete (Devbridge) v1.4.10 and Popper.js v1.16.1 (Fixed <a href="https://gitlab.com/nobody42/localcdn/-/issues/68">#68</a>)</li>
|
||||
<li>Font Awesome injections in Chromium deactivated (Fixed <a href="https://gitlab.com/nobody42/localcdn/-/issues/67">#67</a>)</li>
|
||||
</ul>
|
||||
<div class="topic-label">
|
||||
Please update your uBlock/uMatrix rules
|
||||
|
Loading…
x
Reference in New Issue
Block a user