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

Implemented: Indicate missing resources on the icon (#301)

This commit is contained in:
nobody
2021-03-12 07:22:49 +01:00
parent 5c7868af0d
commit 035e603bc1
6 changed files with 56 additions and 8 deletions

View File

@@ -44,6 +44,10 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
targetDetails = requestAnalyzer.getLocalTarget(requestDetails, tab.url);
targetPath = targetDetails.path;
if (targetDetails === false) {
++stateManager.tabs[tabIdentifier].missing;
}
if (Regex.GOOGLE_FONTS.test(requestDetails.url)) {
let initiatorDomain = helpers.extractDomainFromUrl(tab.url, true);
// Check if the website is allowed to load Google Fonts