From f7444c6c0b01a70e3ed064df274de14c164e987a Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Feb 2017 16:57:16 +0900 Subject: :v: --- src/web/app/common/scripts/check-for-update.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/web/app/common/scripts/check-for-update.js (limited to 'src/web/app/common/scripts/check-for-update.js') diff --git a/src/web/app/common/scripts/check-for-update.js b/src/web/app/common/scripts/check-for-update.js new file mode 100644 index 0000000000..cd7279e3b8 --- /dev/null +++ b/src/web/app/common/scripts/check-for-update.js @@ -0,0 +1,11 @@ +module.exports = () => { + fetch('/api:meta').then(res => { + res.json().then(meta => { + if (meta.commit.hash !== VERSION) { + if (window.confirm('新しいMisskeyのバージョンがあります。更新しますか?\r\n(このメッセージが繰り返し表示される場合は、サーバーにデータがまだ届いていない可能性があるので、少し時間を置いてから再度お試しください)')) { + location.reload(true); + } + } + }); + }); +}; -- cgit v1.3.1-freya