diff --git a/core/files.js b/core/files.js index 8dde6102..3b9373b5 100644 --- a/core/files.js +++ b/core/files.js @@ -83,7 +83,7 @@ var files = { 'resources/jqueryui/1.11.4/jquery-ui.min.jsm': true, // lozad.js - 'resources/lozad.js/1.14.0/lozad': true, + 'resources/lozad.js/1.14.0/lozad.min.jsm': true, // Modernizr 'resources/modernizr/2.8.3/modernizr.min.jsm': true, diff --git a/core/mappings.js b/core/mappings.js index 9de06148..ba3df4ec 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -469,6 +469,12 @@ var mappings = { '/': { 'cdn-cgi/scripts/7089c43e/cloudflare-static/rocket-loader.min.': resources.cfRocketLoader } + }, + // Akamai WebCDN + 'akamai-webcdn.kgstatic.net': { + '/': { + 'renewal/static/js/lozad.min.': resources.lozad + } } }; diff --git a/core/request-analyzer.js b/core/request-analyzer.js index 79b31858..82553e3b 100644 --- a/core/request-analyzer.js +++ b/core/request-analyzer.js @@ -89,7 +89,7 @@ requestAnalyzer._matchBasePath = function (hostMappings, channelPath) { requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channelHost, channelPath) { - let resourcePath, versionNumber, resourcePattern, filename, bundle; + let resourcePath, versionNumber, resourcePattern, filename; resourcePath = channelPath.replace(basePath, ''); @@ -123,7 +123,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel } // Get bundle name - bundle = helpers.determineBundle(channelPath); + let bundle = helpers.determineBundle(channelPath); if(bundle !== '') { filename = channelPath.split('/').pop(); targetPath = targetPath + filename + 'm'; @@ -132,7 +132,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel // Prepare and return a local target. return { 'source': channelHost, - 'version': version, + 'version': version.toString(), 'path': targetPath, 'bundle': bundle }; diff --git a/core/resources.js b/core/resources.js index 4b3e3948..2038a332 100644 --- a/core/resources.js +++ b/core/resources.js @@ -102,7 +102,7 @@ var resources = { }, // lozad.js 'lozad': { - 'path': 'resources/lozad.js/{version}/lozad', + 'path': 'resources/lozad.js/{version}/lozad.min.jsm', 'type': 'application/javascript' }, // Modernizr diff --git a/manifest.json b/manifest.json index a1b9d081..9b66256e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "LocalCDN (fork from Decentraleyes)", - "version": "2.1.7", + "version": "2.1.8", "browser_specific_settings": { "gecko": { "id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}", diff --git a/modules/internal/helpers.js b/modules/internal/helpers.js index 172113a2..37fd7d36 100644 --- a/modules/internal/helpers.js +++ b/modules/internal/helpers.js @@ -185,6 +185,8 @@ helpers.determineCdnName = function (domainName) { return 'Font Awesome CDN'; case 'ajax.cloudflare.com': return 'Cloudflare CDN'; + case 'akamai-webcdn.kgstatic.net': + return 'Akamai WebCDN'; default: return 'Unknown'; } @@ -226,7 +228,7 @@ helpers.determineResourceName = function (filename) { return 'jQuery'; case 'jquery-ui.min.jsm': return 'jQuery UI'; - case 'lozad': + case 'lozad.min.jsm': return 'lozad.js'; case 'modernizr.min.jsm': return 'Modernizr'; diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 185d82d6..554bccc2 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -23,16 +23,8 @@ New in LocalCDN:
2020-03-25 (v2.1.7)
2020-03-22 (v2.1.6)