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

Fixed: Unblock Google Fonts (#561)

This commit is contained in:
nobody
2021-07-08 06:46:12 +02:00
parent eb5fe4cc7f
commit 6ba26b7e36
3 changed files with 3 additions and 11 deletions

View File

@ -48,11 +48,11 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
if (Regex.GOOGLE_FONTS.test(requestDetails.url)) {
let initiatorDomain = helpers.extractDomainFromUrl(tab.url, true);
// Check if the website is allowed to load Google Fonts
if (interceptor.blockGoogleFonts === true && !requestAnalyzer.domainsGoogleFonts[initiatorDomain]) {
if (interceptor.blockGoogleFonts === true && !interceptor.allowedDomainsGoogleFonts[initiatorDomain]) {
return {
'cancel': true
};
} else if (interceptor.blockGoogleFonts === false || requestAnalyzer.domainsGoogleFonts[initiatorDomain]) {
} else if (interceptor.blockGoogleFonts === false || interceptor.allowedDomainsGoogleFonts[initiatorDomain]) {
return {
'cancel': false
};