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

small improvements

This commit is contained in:
nobody
2025-03-28 18:43:18 +01:00
parent 8157dbcd3a
commit ee7258c518
18 changed files with 129 additions and 160 deletions

View File

@@ -20,7 +20,7 @@
* Stats
*/
let stats = {};
const stats = {};
/**
@@ -28,12 +28,11 @@ let stats = {};
*/
stats.setStats = function (injection) {
let data, today, cdn, framework, newEntry, pathSegments;
data = storageManager.statistics;
today = new Date().toISOString().slice(0, 10);
cdn = injection.source;
const data = storageManager.statistics;
const today = new Date().toISOString().slice(0, 10);
const cdn = injection.source;
let framework, pathSegments, newEntry;
if (injection.bundle !== '') {
pathSegments = injection.path.split('/');
framework = `${pathSegments[0]}/${pathSegments[1]}/${pathSegments[2]}/`;