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

@@ -13,9 +13,6 @@ export async function buildFront(commitHash, branch) {
// build html
if (!fs.existsSync('./build/')){
fs.mkdirSync('./build/');
fs.mkdirSync('./build/ios/');
fs.mkdirSync('./build/pc/');
fs.mkdirSync('./build/mob/');
}
// get rid of old build path
if (fs.existsSync('./min')) {
@@ -26,16 +23,9 @@ export async function buildFront(commitHash, branch) {
let params = {
"hash": commitHash,
"lang": i,
"useragent": "pc",
"branch": branch
}
fs.writeFileSync(`./build/pc/${i}.html`, cleanHTML(page(params)));
params["useragent"] = "iphone os";
fs.writeFileSync(`./build/ios/${i}.html`, cleanHTML(page(params)));
params["useragent"] = "android";
fs.writeFileSync(`./build/mob/${i}.html`, cleanHTML(page(params)));
fs.writeFileSync(`./build/${i}.html`, cleanHTML(page(params)));
}
// build js & css
await esbuild.build({
@@ -45,7 +35,7 @@ export async function buildFront(commitHash, branch) {
loader: { '.js': 'js', '.css': 'css', },
charset: 'utf8'
})
} catch (e) {
} catch {
return;
}
}