1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-02-07 23:58:51 +01:00

Fixed selection of 'jQuery latest' (#64)

This commit is contained in:
nobody 2020-07-24 08:59:08 +02:00
parent 7daee86505
commit 1a3ec35ab6
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
3 changed files with 4 additions and 3 deletions

View File

@ -314,6 +314,7 @@ var mappings = {
'code.jquery.com': {
'/': {
'jquery-{version}.': resources.jQuery,
'jquery-latest.': resources.jQuery,
'ui/{version}/jquery-ui.': resources.jQueryUI,
'mobile/{version}/jquery.mobile': resources.jQueryMobile
}

View File

@ -275,10 +275,9 @@ helpers.setLastVersion = function (type, version) {
* Switch-Case (with Regex): 0-8ms (Average ~4ms)
* If-Else-If: 0-5ms (Average <1ms)
*/
let requestVersion;
if(version !== null && version !== undefined) {
requestVersion = version.toString();
let requestVersion = version.toString();
}
if (type.includes('/algoliasearch/3.')) {
return '3.35.1';
@ -393,7 +392,7 @@ helpers.setLastVersion = function (type, version) {
return '1.8.3';
} else if (type.includes('/jquery/2.')) {
return '2.2.4';
} else if (type.includes('/jquery/3.')) {
} else if (type.includes('/jquery/3.') || type.includes('/jquery/null')) {
return '3.5.1';
} else if (type.includes('/jquery.devbridge-autocomplete/1.')) {
return '1.4.10';

View File

@ -26,6 +26,7 @@
<ul>
<li>Implemented: Hide icon setting if not supported</li>
<li>Implemented: Show the rule set generator only when there are new CDNs (reported by <a href="https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork-of-decentraleyes/reviews/1572952/">review</a>)</li>
<li>Fixed: Selection of 'jQuery latest' (<a href="https://codeberg.org/nobody/LocalCDN/issues/64">#64</a>)</li>
</ul>
<div id="generator-section">
<div class="topic-label">