From 160854cf8a0a52a72ba6341b6dda0e25dd89fbd3 Mon Sep 17 00:00:00 2001
From: src48597962 <48597962@qq.com>
Date: Sun, 16 Oct 2022 20:33:25 +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 | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/SrcLive.js b/SrcLive.js
index 111a3019..5972c26f 100644
--- a/SrcLive.js
+++ b/SrcLive.js
@@ -1,6 +1,6 @@
function Live() {
addListener("onClose", $.toString(() => {
- //clearMyVar('guanlicz');
+ clearMyVar('editmode');
}));
var d = [];
let livefile = "hiker://files/rules/Src/Juying/live.txt";
@@ -31,10 +31,10 @@ function Live() {
d.push({
title: '聚影√     ⚙直播设置⚙',
img: "https://img.vinua.cn/images/QqyC.png",
- url: $('hiker://empty#noRecordHistory##noHistory#').rule((datalist) => {
+ url: $('hiker://empty#noRecordHistory##noHistory#').rule(() => {
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcLive.js');
LiveSet();
- },datalist),
+ }),
col_type: 'avatar'
});
d.push({
@@ -186,8 +186,10 @@ function guanlidata(datalist) {
function LiveSet() {
addListener("onClose", $.toString(() => {
- //clearMyVar('guanlicz');
- refreshPage(false);
+ if(getMyVar('isEdit')=="1"){
+ refreshPage(false);
+ }
+ clearMyVar('isEdit');
}));
setPageTitle("⚙直播设置⚙");
var d = [];
@@ -226,18 +228,40 @@ function LiveSet() {
col_type: 'icon_2_round',
url: $('#noLoading#').lazyRule(() => {
writeFile("hiker://files/rules/Src/Juying/live.txt", "");
+ putMyVar('isEdit','1');
return "toast://已清空";
})
});
d.push({
col_type: 'line'
});
-
+ d.push({
+ title: '删除分组',
+ col_type: 'scroll_button',
+ url: $('#noLoading#').lazyRule(() => {
+ putMyVar('editmode','delete');
+ back(false);
+ return "toast://进入删除分组模式";
+ })
+ });
+ d.push({
+ title: '分组改名',
+ col_type: 'scroll_button',
+ url: $('#noLoading#').lazyRule(() => {
+ putMyVar('editmode','rename');
+ back(false);
+ return "toast://进入删除分组模式";
+ })
+ });
+ d.push({
+ col_type: 'line'
+ });
d.push({
title: '删除失效的直播源地址',
desc: '此功能为实验性的,可能存在误删,谨慎操作!\n通过判断地址是否可以访问来甄别有效性',
col_type: 'text_center_1',
url: $('#noLoading#').lazyRule(() => {
+ putMyVar('isEdit','1');
let urls = [];
let JYlivefile="hiker://files/rules/Src/Juying/live.txt";
let JYlive = fetch(JYlivefile);