- page render caching
- onDemand block caching
- page html minify
- better rate limiting
- minor cobalt.js clean up
- page render platform indication in settings popup

all these changes are aimed to improve performance and responsiveness

!! not final version of 5.2 !!
This commit is contained in:
wukko
2023-03-10 00:41:17 +06:00
parent daa2856d92
commit a3daa65148
10 changed files with 100 additions and 58 deletions

View File

@@ -5,16 +5,19 @@ import loadJson from "../modules/sub/loadJSON.js";
const locPath = './src/localization/languages'
let loc = {}
let languages = [];
export function loadLoc() {
fs.readdir(locPath, (err, files) => {
if (err) return false;
files.forEach(file => {
loc[file.split('.')[0]] = loadJson(`${locPath}/${file}`)
loc[file.split('.')[0]] = loadJson(`${locPath}/${file}`);
languages.push(file.split('.')[0])
});
})
}
loadLoc();
export function replaceBase(s) {
return s.replace(/\n/g, '<br/>').replace(/{appName}/g, appName).replace(/{repo}/g, repo).replace(/\*;/g, "&bull;");
}
@@ -42,3 +45,4 @@ export default function(lang, string, replacement) {
return `!!${string}!!`
}
}
export let languageList = languages;