From dfa20bbb6180e4c8ab43d1699df16adca6b8cf35 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Tue, 18 Oct 2022 11:15:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcLive.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcLive.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/SrcLive.js b/SrcLive.js index c3fa0d53..1add7c3e 100644 --- a/SrcLive.js +++ b/SrcLive.js @@ -135,7 +135,26 @@ function Live() { } writeFile(livefile, JYlives.join('\n')); refreshPage(false); - return "toast://已删除分组:"+groupname; + return "toast://已删除分组 <"+groupname+"> 所有地址"; + }else if(getMyVar('editmode','0')=="grouprename"){ + return $("","输入新的分组名").input((groupname,livefile)=>{ + if(input){ + let JYlive=fetch(livefile); + let JYlives = JYlive.split('\n'); + for(let i=0;i-1&&JYlives[i].indexOf(groupname)>-1){ + JYlives[i] = JYlives[i].replace(groupname,input); + } + }catch(e){} + } + writeFile(livefile, JYlives.join('\n')); + refreshPage(false); + return "toast://分组 <"+groupname+"> 改名为《"+input+"》"; + }else{ + return "toast://输入不能为空" + } + },groupname,livefile) } },grouplist,grouplist[i],guanlidata,lists,livefile), col_type: "scroll_button",