diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-05-25 06:33:59 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-05-25 06:33:59 +0900 |
| commit | f06adb5e5350e6b78a5b680a0e390e14a59513a8 (patch) | |
| tree | d90be043d6d6e39baacefb28d702adc274fce171 /src/web/app | |
| parent | Check if ES6 supported (diff) | |
| download | misskey-f06adb5e5350e6b78a5b680a0e390e14a59513a8.tar.gz misskey-f06adb5e5350e6b78a5b680a0e390e14a59513a8.tar.bz2 misskey-f06adb5e5350e6b78a5b680a0e390e14a59513a8.zip | |
Extract to safe.js
Diffstat (limited to 'src/web/app')
| -rw-r--r-- | src/web/app/base.pug | 3 | ||||
| -rw-r--r-- | src/web/app/boot.js | 7 | ||||
| -rw-r--r-- | src/web/app/safe.js | 11 |
3 files changed, 14 insertions, 7 deletions
diff --git a/src/web/app/base.pug b/src/web/app/base.pug index fd57f55931..f7da0574bd 100644 --- a/src/web/app/base.pug +++ b/src/web/app/base.pug @@ -17,6 +17,9 @@ html script include ./../../../built/web/assets/boot.js + script + include ./../../../built/web/assets/safe.js + script(src='https://use.fontawesome.com/22aba0df4f.js' async) body diff --git a/src/web/app/boot.js b/src/web/app/boot.js index d38b12a742..4ac3a020ea 100644 --- a/src/web/app/boot.js +++ b/src/web/app/boot.js @@ -11,13 +11,6 @@ 'use strict'; -// Detect an old browser -if (window.fetch == undefined) { - alert( - 'お使いのブラウザが古いためMisskeyを動作させることができません。' + - 'バージョンを最新のものに更新するか、別のブラウザをお試しください。'); -} - // Get the current url information const Url = new URL(location.href); diff --git a/src/web/app/safe.js b/src/web/app/safe.js new file mode 100644 index 0000000000..1bdd10ea58 --- /dev/null +++ b/src/web/app/safe.js @@ -0,0 +1,11 @@ +/** + * 古いブラウザの検知を行う + * ブートローダーとは隔離されているため互いに影響を及ぼすことはない + */ + +// Detect an old browser +if (!'fetch' in window) { + alert( + 'お使いのブラウザが古いためMisskeyを動作させることができません。' + + 'バージョンを最新のものに更新するか、別のブラウザをお試しください。'); +} |