From ace2b0a458527708bc7b8373a859a10be9acc69f Mon Sep 17 00:00:00 2001 From: xmcp Date: Wed, 21 Aug 2019 19:01:20 +0800 Subject: [PATCH] add force update and build number --- src/Title.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Title.js b/src/Title.js index 3eccf44..3a6d840 100644 --- a/src/Title.js +++ b/src/Title.js @@ -24,6 +24,21 @@ const HELP_TEXT=( IcoMoon  等开源项目

+

+ { + if('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then((reg)=>{ + console.log('unregister service worker:',reg); + reg.unregister(); + }); + } + setTimeout(()=>{ + // noinspection SillyAssignmentJS + window.location.href=window.location.href; + },300); + }}>强制更新 + (当前程序版本 [{process.env.REACT_APP_BUILD_INFO||'---'}] {process.env.NODE_ENV}) +

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by