PWA Fix (#5432)
* PWA Fix * SWが/api/へのリクエストに関与しないように * fix semicolon * Update base.pug * Update base.pug
This commit is contained in:
parent
e94dd8a5e8
commit
b040ac6373
5 changed files with 140 additions and 12 deletions
|
|
@ -98,15 +98,10 @@
|
|||
|
||||
// If mobile, insert the viewport meta tag
|
||||
if (isMobile) {
|
||||
const meta = document.createElement('meta');
|
||||
meta.setAttribute('name', 'viewport');
|
||||
meta.setAttribute('content',
|
||||
'width=device-width,' +
|
||||
'initial-scale=1,' +
|
||||
'minimum-scale=1,' +
|
||||
'maximum-scale=1,' +
|
||||
'user-scalable=no');
|
||||
head.appendChild(meta);
|
||||
const viewport = document.getElementsByName("viewport").item(0);
|
||||
viewport.setAttribute('content',
|
||||
`${viewport.getAttribute('content')},minimum-scale=1,maximum-scale=1,user-scalable=no`);
|
||||
head.appendChild(viewport);
|
||||
}
|
||||
|
||||
// Switch desktop or mobile version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue