更新 'SrcJuying.js'

pull/1/head
src48597962 2 years ago
parent a0b999ee05
commit eca0152014
  1. 47
      SrcJuying.js

@ -451,6 +451,12 @@ function sousuo2() {
clearMyVar('sousuo$input');
}));
var searchurl = $('').lazyRule(() => {
let recordlist = storage0.getItem('searchrecord') || [];
recordlist.unshift(input);
if(recordlist.length>10){
recordlist.splice(recordlist.length-1,1);
}
storage0.setItem('searchrecord', recordlist);
return $('hiker://empty#noRecordHistory##noHistory#').rule((name) => {
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJyXunmi.js');
xunmi(name);
@ -506,12 +512,49 @@ function sousuo2() {
}, searchurl)
}
});
if(getItem('searchrecordide','0')=='1'){
let recordlist = storage0.getItem('searchrecord') || [];
if(recordlist.length>0){
d.push({
title: '🗑清空',
url: $('#noLoading#').lazyRule(() => {
clearItem('searchrecord');
deleteItemByCls('searchrecord');
return "hiker://empty";
}),
col_type: 'scroll_button'
});
}
recordlist.forEach(item=>{
d.push({
title: item,
url: item + searchurl,
col_type: 'scroll_button',
extra: {
cls: 'searchrecord',
}
});
})
}
d.push({
title: '<span style="color:#ff6600"><b>\t热搜榜\t\t\t</b></span>',
url: "hiker://empty",
pic_url: 'https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=3779990328,1416553241&fm=179&app=35&f=PNG?w=60&h=70&s=E7951B62A4639D153293A4E90300401B',
col_type: 'icon_small_3'
col_type: 'icon_small_3',
extra: {
longClick: [{
title: "开启/关闭搜索历史记录显示",
js: $.toString(() => {
if(getItem('searchrecordide','0')=='1'){
clearItem('searchrecordide');
}else{
setItem('searchrecordide','1');
}
refreshPage(false);
return "toast://已切换"
})
}]
}
});
var resoufile = "hiker://files/rules/Src/Juying/resou.json";

Loading…
Cancel
Save