1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-02-18 04:40:58 +01:00

Fixed issue with lozad.js

This commit is contained in:
nobody42 2020-03-25 15:31:33 +01:00
parent 23e0893ef0
commit fb286dda1e
No known key found for this signature in database
GPG Key ID: AB5145CF05BFE119
8 changed files with 30 additions and 17 deletions

View File

@ -83,7 +83,7 @@ var files = {
'resources/jqueryui/1.11.4/jquery-ui.min.jsm': true, 'resources/jqueryui/1.11.4/jquery-ui.min.jsm': true,
// lozad.js // lozad.js
'resources/lozad.js/1.14.0/lozad': true, 'resources/lozad.js/1.14.0/lozad.min.jsm': true,
// Modernizr // Modernizr
'resources/modernizr/2.8.3/modernizr.min.jsm': true, 'resources/modernizr/2.8.3/modernizr.min.jsm': true,

View File

@ -469,6 +469,12 @@ var mappings = {
'/': { '/': {
'cdn-cgi/scripts/7089c43e/cloudflare-static/rocket-loader.min.': resources.cfRocketLoader 'cdn-cgi/scripts/7089c43e/cloudflare-static/rocket-loader.min.': resources.cfRocketLoader
} }
},
// Akamai WebCDN
'akamai-webcdn.kgstatic.net': {
'/': {
'renewal/static/js/lozad.min.': resources.lozad
}
} }
}; };

View File

@ -89,7 +89,7 @@ requestAnalyzer._matchBasePath = function (hostMappings, channelPath) {
requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channelHost, channelPath) { requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channelHost, channelPath) {
let resourcePath, versionNumber, resourcePattern, filename, bundle; let resourcePath, versionNumber, resourcePattern, filename;
resourcePath = channelPath.replace(basePath, ''); resourcePath = channelPath.replace(basePath, '');
@ -123,7 +123,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
} }
// Get bundle name // Get bundle name
bundle = helpers.determineBundle(channelPath); let bundle = helpers.determineBundle(channelPath);
if(bundle !== '') { if(bundle !== '') {
filename = channelPath.split('/').pop(); filename = channelPath.split('/').pop();
targetPath = targetPath + filename + 'm'; targetPath = targetPath + filename + 'm';
@ -132,7 +132,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
// Prepare and return a local target. // Prepare and return a local target.
return { return {
'source': channelHost, 'source': channelHost,
'version': version, 'version': version.toString(),
'path': targetPath, 'path': targetPath,
'bundle': bundle 'bundle': bundle
}; };

View File

@ -102,7 +102,7 @@ var resources = {
}, },
// lozad.js // lozad.js
'lozad': { 'lozad': {
'path': 'resources/lozad.js/{version}/lozad', 'path': 'resources/lozad.js/{version}/lozad.min.jsm',
'type': 'application/javascript' 'type': 'application/javascript'
}, },
// Modernizr // Modernizr

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "LocalCDN (fork from Decentraleyes)", "name": "LocalCDN (fork from Decentraleyes)",
"version": "2.1.7", "version": "2.1.8",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}", "id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}",

View File

@ -185,6 +185,8 @@ helpers.determineCdnName = function (domainName) {
return 'Font Awesome CDN'; return 'Font Awesome CDN';
case 'ajax.cloudflare.com': case 'ajax.cloudflare.com':
return 'Cloudflare CDN'; return 'Cloudflare CDN';
case 'akamai-webcdn.kgstatic.net':
return 'Akamai WebCDN';
default: default:
return 'Unknown'; return 'Unknown';
} }
@ -226,7 +228,7 @@ helpers.determineResourceName = function (filename) {
return 'jQuery'; return 'jQuery';
case 'jquery-ui.min.jsm': case 'jquery-ui.min.jsm':
return 'jQuery UI'; return 'jQuery UI';
case 'lozad': case 'lozad.min.jsm':
return 'lozad.js'; return 'lozad.js';
case 'modernizr.min.jsm': case 'modernizr.min.jsm':
return 'Modernizr'; return 'Modernizr';

View File

@ -23,16 +23,8 @@
New in LocalCDN: New in LocalCDN:
</div> </div>
<ul> <ul>
<li>Added lozad v1.14.0</li> <li>New CDN: "akamai-webcdn.kgstatic.net" (Akamai WebCDN)</li>
<li>Added Findify v6.9.15</li> <li>Fixed issue with lozad.js in v2.1.7</li>
<li>Added detection of framework-bundles (e.g. Findify)</li>
<li>Fixed Moment.js (File extension and detection of resource name)</li>
<li>Added Vue.js v1.0.28 and page.js v1.7.1</li>
<li>Fixed file extensions to prevent warnigns of Mozillas validation tests</li>
<li>Added new endpoint for webfont</li>
<li>Added new endpoint for bootstrap-slider</li>
<li>Added "ajax.cloudflare.com" and "Rocket Loader" (<a href="https://gitlab.com/nobody42/localcdn/-/issues/24">"#24"</a>)</li>
<li>Added Font Awesome v3.2.1</li>
</ul> </ul>
<div class="topic-label"> <div class="topic-label">
Please update your uBlock/uMatrix rules Please update your uBlock/uMatrix rules
@ -49,6 +41,19 @@
<input id="button-copy-rule-set" type="button" value="Copy"> <input id="button-copy-rule-set" type="button" value="Copy">
<hr/> <hr/>
<h2>History</h2> <h2>History</h2>
<p>2020-03-25 (v2.1.7)</p><br/>
<ul>
<li>Added lozad v1.14.0</li>
<li>Added Findify v6.9.15</li>
<li>Added detection of framework-bundles (e.g. Findify)</li>
<li>Fixed Moment.js (File extension and detection of resource name)</li>
<li>Added Vue.js v1.0.28 and page.js v1.7.1</li>
<li>Fixed file extensions to prevent warnigns of Mozillas validation tests</li>
<li>Added new endpoint for webfont</li>
<li>Added new endpoint for bootstrap-slider</li>
<li>Added "ajax.cloudflare.com" and "Rocket Loader" (<a href="https://gitlab.com/nobody42/localcdn/-/issues/24">"#24"</a>)</li>
<li>Added Font Awesome v3.2.1</li>
</ul>
<p>2020-03-22 (v2.1.6)</p><br/> <p>2020-03-22 (v2.1.6)</p><br/>
<ul> <ul>
<li>URL of testing utility updated</li> <li>URL of testing utility updated</li>