From 39f708b0fc847161108ce64d8989c9a1fb5aa5f4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 21 Feb 2020 03:51:41 +0900 Subject: [PATCH] =?UTF-8?q?=E8=A4=87=E6=95=B0=E3=82=BF=E3=83=96=E3=81=A7?= =?UTF-8?q?=E9=96=8B=E3=81=84=E3=81=A6=E3=82=8B=E3=81=A8=E3=81=8D=E3=81=AB?= =?UTF-8?q?=E5=8B=95=E4=BD=9C=E3=81=8C=E3=81=8A=E3=81=8B=E3=81=97=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/init.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/init.ts b/src/client/init.ts index b65eba7c0..2f2f9f5d5 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -136,6 +136,14 @@ document.body.innerHTML = '
'; const os = new MiOS(); os.init(async () => { + window.addEventListener('storage', e => { + if (e.key === 'vuex') { + os.store.replaceState(JSON.parse(localStorage['vuex'])); + } else if (e.key === 'i') { + location.reload(); + } + }, false) + if ('Notification' in window && os.store.getters.isSignedIn) { // 許可を得ていなかったらリクエスト if (Notification.permission === 'default') {