From e80601389f7154d38a20595ab48000083af4eddb Mon Sep 17 00:00:00 2001 From: fofolee Date: Fri, 10 Apr 2020 17:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=9B=B4=E6=96=B0=E6=A3=80?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/index.js | 62 ++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/assets/index.js b/assets/index.js index a6a8bc4..eb8b7ad 100644 --- a/assets/index.js +++ b/assets/index.js @@ -1,33 +1,33 @@ -checkUpdate = () => { - let p = window.pluginInfo; - if (!utools.db.get(p.version)) { - $.get(p.publishPage, data => { - var re = new RegExp(`\\[插件\\]\\[${p.pluginName} (.*?)\\](.*?) - 猿料<\\/title>`) - data = re.exec(data); - let lastVer = data[1], - desc = data[2]; - if (lastVer != p.version) { - options = { - type: 'info', - title: '插件有可用更新', - icon: window.logo, - cancelId: 1, - message: `发现新版本 ${lastVer},是否前往更新?\n更新内容:\n${desc}`, - buttons: ['起驾', '朕知道了', '别再烦朕'] - }; - window.messageBox(options, index => { - if (index == 0) { - window.open(p.publishPage) - } else if (index == 2) { - utools.db.put({ _id: p.version, data: "pass" }) - } - }) - } else { - console.log('当前已是最新版本!'); - } - }) - } -} +// checkUpdate = () => { +// let p = window.pluginInfo; +// if (!utools.db.get(p.version)) { +// $.get(p.publishPage, data => { +// var re = new RegExp(`<title>\\[插件\\]\\[${p.pluginName} (.*?)\\](.*?) - 猿料<\\/title>`) +// data = re.exec(data); +// let lastVer = data[1], +// desc = data[2]; +// if (lastVer != p.version) { +// options = { +// type: 'info', +// title: '插件有可用更新', +// icon: window.logo, +// cancelId: 1, +// message: `发现新版本 ${lastVer},是否前往更新?\n更新内容:\n${desc}`, +// buttons: ['起驾', '朕知道了', '别再烦朕'] +// }; +// window.messageBox(options, index => { +// if (index == 0) { +// window.open(p.publishPage) +// } else if (index == 2) { +// utools.db.put({ _id: p.version, data: "pass" }) +// } +// }) +// } else { +// console.log('当前已是最新版本!'); +// } +// }) +// } +// } saveIcon = async tasks => { if (window.isWin) { @@ -128,7 +128,7 @@ show = text => { utools.onPluginEnter(({ code, type, payload }) => { utools.setExpendHeight(0); - checkUpdate(); + // checkUpdate(); if (window.isWin) { utools.setExpendHeight(50); $("#tasklist").html(`<div class="load">Loading...</div>`);