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

Improved: Bundles detection

This commit is contained in:
nobody
2020-11-09 19:42:09 +01:00
parent e5df85fadb
commit 965dfaa1da
2 changed files with 10 additions and 9 deletions

View File

@@ -24,20 +24,21 @@ var targets = {};
* Public Methods
*/
targets.determineBundle = function (path = '') {
if (path.includes('findify')) {
targets.determineBundle = function (path) {
path = path.replace('resources', '');
if (path.startsWith('/findify')) {
return 'Findify';
} else if (path.includes('bootstrap-datepicker')) {
} else if (path.startsWith('/bootstrap-datepicker')) {
return 'Bootstrap Datepicker';
} else if (path.includes('/jquery.lazy/')) {
} else if (path.startsWith('/jquery.lazy/')) {
return 'jQuery Lazy';
} else if (path.includes('/waypoints/')) {
} else if (path.startsWith('/waypoints/')) {
return 'Waypoints';
} else if (path.includes('/highlight.js/')) {
} else if (path.startsWith('/highlight.js/')) {
return 'highlight.js';
} else if (path.includes('/element-ui/')) {
} else if (path.startsWith('/element-ui/')) {
return 'ElementUI';
} else if (path.includes('/select2/')) {
} else if (path.startsWith('/select2/')) {
return 'Select2';
} else {
return '';