From 1d8b08854a72c1e6eeee7d9f729262cfbb843c67 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Sat, 7 Oct 2023 21:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJuPublic.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJuPublic.js | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/SrcJuPublic.js b/SrcJuPublic.js index b6b128ab..9a29a520 100644 --- a/SrcJuPublic.js +++ b/SrcJuPublic.js @@ -33,6 +33,7 @@ let yidatalist = yxdatalist.filter(it=>{ let erdatalist = yxdatalist.filter(it=>{ return it.erparse; }); + function selectsource(input) { let sourcenames = []; yidatalist.forEach(it=>{ @@ -81,8 +82,20 @@ function selectsource(input) { return 'toast://'+runMode+' 主页源已设置为:' + input; }, input, sourcename, cfgfile, Juconfig) } +let sousuoextra = { + id: "sousuopageid", + newWindow: true, + windowId: MY_RULE.title + "搜索页", + longClick: [{ + title: "🔍搜索", + js: $.toString((sousuopage) => { + return sousuopage; + },sousuopage) + }] +} function rulePage(type,page) { - updateItem("sousuopageid",{extra:{newWindow: false}}); + sousuoextra.newWindow = false; + updateItem("sousuopageid",{extra:sousuoextra}); return $("hiker://empty#noRecordHistory##noHistory#" + (page ? "?page=fypage" : "")).rule((type) => { require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJuPublic.js'); getYiData(type); @@ -136,11 +149,35 @@ function getYiData(datatype,od) { let loading; if (page==1 && typeof(setPreResult)!="undefined") { loading = 1; + d.push({ + title: "", + col_type: "text_1", + extra: { + lineVisible: false, + cls: "loading_gif" + } + }) + d.push({ + title: "", + col_type: "text_1", + extra: { + lineVisible: false, + cls: "loading_gif" + } + }) + d.push({ + title: "", + col_type: "text_1", + extra: { + lineVisible: false, + cls: "loading_gif" + } + }) d.push({ pic_url: "https://hikerfans.com/weisyr/img/Loading1.gif", col_type: "pic_1_center", extra: { - id: itemid + cls: "loading_gif" } }) setPreResult(d); @@ -154,7 +191,7 @@ function getYiData(datatype,od) { xlog(e.message); } if(loading){ - deleteItem(itemid); + deleteItemByCls(loading_gif); } if(data.length==0 && page==1){ data.push({