web: more ipad accommodations and clean up

- moved all user agent toggles to (legacy) frontend, like it should have always been
- removed unnecessary building
This commit is contained in:
wukko
2024-05-11 01:05:24 +06:00
parent 0e6ea09b16
commit e2d1913043
5 changed files with 24 additions and 35 deletions

View File

@@ -1,11 +1,6 @@
import { languageList } from "../../localization/manager.js";
export default function(lang, userAgent) {
export default function(lang) {
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`;
return `/build/${language}.html`;
}