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') {