From dc948a5bf273e4c46d1ae14a3edc193833d74ed5 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Sat, 6 Jul 2024 14:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJySet.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJySet.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/SrcJySet.js b/SrcJySet.js index 1762aa85..19d1725b 100644 --- a/SrcJySet.js +++ b/SrcJySet.js @@ -1478,6 +1478,37 @@ function manageSet(){ return "hiker://empty"; }) }); + d.push({ + title: '检测版本更新', + img: 'https://hikerfans.com/tubiao/system/100.png', + col_type: 'text_icon', + url: $("#noLoading#").lazyRule(() => { + try{ + eval(request(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcTmplVersion.js')) + let nowVersion = getItem('Version', "0.1");//现在版本 + let nowtime = Date.now(); + if (parseFloat(newVersion.SrcJuying) > parseFloat(nowVersion)) { + confirm({ + title:'发现新版本,是否更新?', + content:nowVersion+'=>'+newVersion.SrcJuying+'\n'+newVersion.SrcJuyingdesc[newVersion.SrcJuying], + confirm: $.toString((nowtime,newVersion) => { + setItem('Version', newVersion); + setItem('VersionChecktime', nowtime+'time'); + deleteCache(); + refreshPage(); + },nowtime, newVersion.SrcJuying), + cancel:'' + }) + log('检测到新版本!\nV'+newVersion.SrcJuying+'版本》'+newVersion.SrcJuyingdesc[newVersion.SrcJuying]); + }else{ + toast('已经为最新版本'); + } + }catch(e){ + toast('获取版本信息异常>'+e.message); + } + return "hiker://empty"; + }) + }); d.push({ title: '支持一下作者', img: 'https://hikerfans.com/tubiao/system/100.png',