mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Miscellaneous improvements
This commit is contained in:
@ -29,8 +29,7 @@ var requestAnalyzer = {};
|
||||
|
||||
requestAnalyzer.isValidCandidate = function (requestDetails, tabDetails) {
|
||||
|
||||
let initiatorDomain, isWhitelisted;
|
||||
let fontawesome = new RegExp('\(font-awesome|fontawesome)');
|
||||
let initiatorDomain, isWhitelisted, fontawesome;
|
||||
|
||||
initiatorDomain = helpers.extractDomainFromUrl(tabDetails.url, true);
|
||||
|
||||
@ -45,6 +44,7 @@ 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;
|
||||
@ -112,6 +112,9 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
||||
|
||||
shorthandResource = shorthands.specialFiles(channelHost, channelPath);
|
||||
if (shorthandResource) {
|
||||
if (requestAnalyzer.logging) {
|
||||
console.log('[ LocalCDN ] Replaced resource: ' + shorthandResource.path);
|
||||
}
|
||||
return shorthandResource;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user