From 350e4e84553f63fd384a66d31bed759a4e9251ba Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 13 Jul 2023 11:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJu.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJu.js | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/SrcJu.js b/SrcJu.js index fbbee5e7..7b23c38c 100644 --- a/SrcJu.js +++ b/SrcJu.js @@ -140,7 +140,18 @@ function yiji() { return 'toast://运行模式已切换为:' + input; }, cfgfile, Juconfig,it) } - }) + }).concat([{ + title:getItem('runtypebtn')?"关界面按钮":"开界面按钮", + js: $.toString(()=>{ + if(getItem('runtypebtn')){ + clearItem('runtypebtn'); + }else{ + setItem('runtypebtn',1); + } + refreshPage(false); + return "hiker://empty"; + }) + }]) } }) if(parse&&parse["排行"]){ @@ -255,18 +266,23 @@ function yiji() { d.push({ col_type: 'blank_block' }) - runModes.forEach((it) =>{ + if(getItem('runtypebtn')){ + runModes.forEach((it) =>{ + d.push({ + title: Juconfig["runMode"]==it?`““””`+it+``:it, + url: $('#noLoading#').lazyRule((cfgfile,Juconfig,input) => { + Juconfig["runMode"] = input; + writeFile(cfgfile, JSON.stringify(Juconfig)); + refreshPage(false); + return 'toast://运行模式已切换为:' + input; + }, cfgfile, Juconfig ,it), + col_type: 'scroll_button' + }); + }) d.push({ - title: Juconfig["runMode"]==it?`““””`+it+``:it, - url: $('#noLoading#').lazyRule((cfgfile,Juconfig,input) => { - Juconfig["runMode"] = input; - writeFile(cfgfile, JSON.stringify(Juconfig)); - refreshPage(false); - return 'toast://运行模式已切换为:' + input; - }, cfgfile, Juconfig ,it), - col_type: 'scroll_button' - }); - }) + col_type: 'blank_block' + }) + } putMyVar(runMode+"_"+sourcename, "1"); } try{