lintをGitHub Actions でするように (#6101)

* package.json の lint スクリプトを修正

* lint アクションを追加

* yarn lint --fix

* 手動修正
This commit is contained in:
rinsuki
2020-03-04 11:45:33 +09:00
committed by GitHub
parent 678ff17d0f
commit c18f6fde80
15 changed files with 34 additions and 24 deletions

View File

@ -81,14 +81,14 @@ if (lang == null) {
// Detect the user agent
const ua = navigator.userAgent.toLowerCase();
let isMobile = /mobile|iphone|ipad|android/.test(ua);
const isMobile = /mobile|iphone|ipad|android/.test(ua);
// Get the <head> element
const head = document.getElementsByTagName('head')[0];
// If mobile, insert the viewport meta tag
if (isMobile || window.innerWidth <= 1024) {
const viewport = document.getElementsByName("viewport").item(0);
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);