cobalt/src/modules/pageRender/findRendered.js
wukko a3daa65148 5.2
- 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 !!
2023-03-10 00:41:17 +06:00

12 lines
413 B
JavaScript

import { languageList } from "../../localization/manager.js";
export default function(lang, userAgent) {
let language = languageList.includes(lang) ? lang : "en";
let ua = userAgent.toLowerCase();
let platform = (ua.match("android") || ua.match("iphone os")) ? "mob" : "pc";
if (platform === "mob" && ua.match("iphone os")) platform = "ios";
return `/build/${platform}/${language}.html`;
}