1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2024-12-22 08:04:10 +01:00

Merge branch 'develop' into 'master'

Fixed issue with lozad.js

See merge request nobody42/localcdn!9
This commit is contained in:
nobody 2020-03-25 14:35:00 +00:00
commit 642b576500
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,
// 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,

View File

@ -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
}
}
};

View File

@ -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
};

View File

@ -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

View File

@ -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}",

View File

@ -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';

View File

@ -23,16 +23,8 @@
New in LocalCDN:
</div>
<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>
<li>New CDN: "akamai-webcdn.kgstatic.net" (Akamai WebCDN)</li>
<li>Fixed issue with lozad.js in v2.1.7</li>
</ul>
<div class="topic-label">
Please update your uBlock/uMatrix rules
@ -49,6 +41,19 @@
<input id="button-copy-rule-set" type="button" value="Copy">
<hr/>
<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/>
<ul>
<li>URL of testing utility updated</li>