mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-27 16:58:27 +00:00
a3daa65148
- 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 !!
12 lines
413 B
JavaScript
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`;
|
|
}
|