enhance(frontend): viewportの属性を起動後に変化させないことにより処理を簡略化+安定性向上
This commit is contained in:
parent
71808d3cc0
commit
236c235115
|
|
@ -28,7 +28,7 @@ html
|
||||||
meta(name='theme-color-orig' content= themeColor || '#86b300')
|
meta(name='theme-color-orig' content= themeColor || '#86b300')
|
||||||
meta(property='og:site_name' content= instanceName || 'Misskey')
|
meta(property='og:site_name' content= instanceName || 'Misskey')
|
||||||
meta(property='instance_url' content= instanceUrl)
|
meta(property='instance_url' content= instanceUrl)
|
||||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
meta(name='viewport' content='width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover')
|
||||||
meta(name='format-detection' content='telephone=no,date=no,address=no,email=no,url=no')
|
meta(name='format-detection' content='telephone=no,date=no,address=no,email=no,url=no')
|
||||||
link(rel='icon' href= icon || '/favicon.ico')
|
link(rel='icon' href= icon || '/favicon.ico')
|
||||||
link(rel='apple-touch-icon' href= appleTouchIcon || '/apple-touch-icon.png')
|
link(rel='apple-touch-icon' href= appleTouchIcon || '/apple-touch-icon.png')
|
||||||
|
|
|
||||||
|
|
@ -109,13 +109,6 @@ export async function common(createVue: () => Promise<App<Element>>) {
|
||||||
else window.location.reload();
|
else window.location.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
// If mobile, insert the viewport meta tag
|
|
||||||
if (['smartphone', 'tablet'].includes(deviceKind)) {
|
|
||||||
const viewport = window.document.getElementsByName('viewport').item(0);
|
|
||||||
viewport.setAttribute('content',
|
|
||||||
`${viewport.getAttribute('content')}, minimum-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover`);
|
|
||||||
}
|
|
||||||
|
|
||||||
//#region Set lang attr
|
//#region Set lang attr
|
||||||
const html = window.document.documentElement;
|
const html = window.document.documentElement;
|
||||||
html.setAttribute('lang', lang);
|
html.setAttribute('lang', lang);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue