聚合搜索
https://www.baidu.com
分享者: laizhiyu (6509)发布时间: 02/26 00:38
在原版的基础上,增加了多个搜索引擎。
有些(有些不可以,不会改)可以用源变量搜索,改了源变量后,需要刷新。
{
"articleStyle": 0,
"cacheFirst": false,
"customOrder": -10106483,
"enableJs": true,
"enabled": true,
"enabledCookieJar": false,
"header": "{\"User-Agent\": \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/81.0.4044.138 Safari\/537.36\"}",
"injectJs": " if (!\/^https:\\\/\\\/(so\\.toutiao\\.com\\\/search\\\/?|quark\\.sm\\.cn\\\/s|wap\\.sogou\\.com\\\/web\\\/searchList\\.jsp|m\\.so\\.com\\\/s|cn\\.bing\\.com\\\/search|www\\.baidu\\.com\\\/s)\\?\/.test(window.location.href) && !document.getElementById('open-yuedu-bookshelf')) {\n const btn = document.createElement('div'),\n autoBtn = document.createElement('div');\n autoBtn.style.display = \"none\";\n const widthIsMax = window.innerWidth > window.innerHeight;\n let size, unit = 1500;\n if (widthIsMax) {\n size = window.innerWidth \/ unit;\n unit = \"vw\";\n } else {\n size = window.innerHeight \/ unit;\n unit = \"vh\"\n }\n\n const pubStyle = `background-color: rgb(255, 153, 0);border-radius:5px;border: 1px solid rgb(255, 153, 0);color: #fff;line-height:1;font-size:${4 * size}${unit};font-weight: 400;padding: ${size}${unit} ${size}${unit};`;\n\n const pubBtn = (btns) => {\n let text = \"\";\n for (let i in btns) {\n text += `<button type=\"button\" style=\"margin:5px auto;${pubStyle}\" onclick=\"window.open(\\`legado:\/\/import\/addToBookshelf?src=${encodeURIComponent(btns[i])},{origin:'通用书源'}\\`, '_blank')\">${i}<\/button>`\n }\n return text\n };\n\n btn.innerHTML = `<button type=\"button\" id='open-yuedu-bookshelf' style=\"z-index: 9999999999;position: fixed;bottom: 7%;right: 7%;${pubStyle}\">加入书架<\/button>`;\n\n autoBtn.innerHTML = `<div id='auto-yuedu-bookshelf' style=\"background-color:#ffffff;z-index: 99999999999;position: fixed;bottom:0;left: 0;width:100%;\">\n <div style=\"background-color:#f0f0f0;border-top:1px rgb(255, 153, 0) solid;display:flex;flex-wrap: wrap;\">${pubBtn({\n 目录识别: window.location.href,\n 尾页目录: `${window.location.href}?录`,\n 单页识别: `${window.location.href}?单`,\n 尾页正文: `${window.location.href}?[${window.location.href}]单`,\n })}\n <\/div>\n <div style=\"padding:0px 5px;border-top: 1px solid rgb(255, 153, 0);\">\n <p><span style=\"color:rgb(255, 153, 0);\">目录识别: <\/span>当前为目录页,且所有章节都在此页或有下一页按钮时,点\"目录识别\"按钮自动识别<\/p>\n <p><span style=\"color:rgb(255, 153, 0);\">尾页目录: <\/span>目录页无下一页按钮且存在其他目录页时,进入最后一个目录页,点\"尾页目录\"逆推生成全部目录(此方式生成的目录无法更新)\n <\/p>\n <p><span style=\"color:rgb(255, 153, 0);\">单页识别:\n <\/span><\/p>\n <p>1. 当前为正文且页面下方为纯数字形式的目录时,点\"单页识别\"按钮自动识别<\/p>\n <p>2. 当前为正文且当前书籍无录页但有下一页按钮时,点\"单页识别\"按钮自动识别(目录过多时需要的识别时间比较长,可考虑进入最后一个正文页点\"尾页正文\"按钮快速逆推生成整本书)<\/p>\n <p><span style=\"color:rgb(255, 153, 0);\">尾页正文:\n <\/span>章节链接符合数字递增规律时,进入最后一个正文页,点\"尾页正文\"逆推生成整本书(此方式生成的目录无法更新)<\/p>\n <\/div>\n <p style=\"margin:0px;background-color: rgb(255, 153, 0);color:#ffffff;width:100%;text-align: center;\">长按弹窗任意空白处关闭弹窗<\/p>\n <\/div>`;\n\n let time, isLong;\n function onBtnStart(evt) {\n evt.preventDefault();\n time = setTimeout(() => {\n isLong = true;\n autoBtn.style.display = \"block\";\n }, 600);\n };\n function onBtnEnd(evt) {\n evt.preventDefault();\n if (isLong) {\n isLong = undefined;\n } else {\n clearTimeout(time);\n time = undefined;\n window.open(`legado:\/\/import\/addToBookshelf?src=${encodeURIComponent(window.location.href)}`, '_blank');\n }\n }\n btn.addEventListener('touchstart', onBtnStart);\n btn.addEventListener('touchend', onBtnEnd);\n btn.addEventListener('touchcancel', onBtnEnd);\n btn.addEventListener('mousedown', onBtnStart);\n btn.addEventListener('mouseup', onBtnEnd);\n document.body.appendChild(btn);\n\n let time2, isLong2;\n function onBtnStart2(evt) {\n time2 = setTimeout(() => {\n isLong2 = true;\n autoBtn.style.display = \"none\";\n }, 600);\n };\n function onBtnEnd2(evt) {\n if (isLong2) {\n evt.preventDefault();\n isLong2 = undefined;\n } else {\n clearTimeout(time2);\n time2 = undefined;\n }\n }\n\n autoBtn.addEventListener('touchstart', onBtnStart2);\n autoBtn.addEventListener('touchend', onBtnEnd2);\n autoBtn.addEventListener('touchcancel', onBtnEnd2);\n autoBtn.addEventListener('mousedown', onBtnStart2);\n autoBtn.addEventListener('mouseup', onBtnEnd2);\n document.body.appendChild(autoBtn);\n }\n\n let time, num = 0;\n const herfs = new Map();\n function onTouchStart(evt) {\n for (const el of evt.path) {\n if (el.tagName === \"A\") {\n if (el.href !== 'javascript:void(0)') {\n const inner = el.href;\n herfs.set(el, inner);\n el.setAttribute('href', 'javascript:void(0)');\n time = setTimeout(() => {\n window.open(`legado:\/\/import\/addToBookshelf?src=${encodeURIComponent(inner)}`, '_blank')\n }, 600);\n }\n break;\n }\n }\n };\n function onTouchEnd(evt) {\n if (time) {\n clearTimeout(time);\n time = undefined;\n }\n for (const el of evt.path) {\n if (el.tagName === \"A\") {\n if (el.href === 'javascript:void(0)') {\n const herf = herfs.get(el);\n if (herf) {\n el.setAttribute('href', herf)\n }\n }\n break;\n }\n }\n }\n\n function addListener(els) {\n Array.from(els, (item) => {\n if (item.getAttribute('add-yuedu-bookshelf') !== 'add-yuedu-bookshelf' && item.innerText && item.href && !\/^#|^javascript:\/.test(item.href)) {\n item.setAttribute('add-yuedu-bookshelf', 'add-yuedu-bookshelf');\n item.addEventListener('touchstart', onTouchStart);\n item.addEventListener('touchend', onTouchEnd);\n item.addEventListener('touchcancel', onTouchEnd);\n item.addEventListener('mousedown', onTouchStart);\n item.addEventListener('mouseup', onTouchEnd);\n }\n });\n num = els.length;\n }\n\n function reAdd() {\n const els = document.getElementsByTagName('a');\n if (els.length > num) addListener(els);\n }\n\n reAdd();\n\n const observer = new ResizeObserver(reAdd);\n observer.observe(document.body);",
"lastUpdateTime": 1760005782283,
"loadWithBaseUrl": false,
"preload": false,
"ruleArticles": "@js:\n{{cookie.removeCookie(source.getKey())}};\nlet labels = `${source.getVariable()}`.trim();\nlet list = [\n{\n\t\"name\":\"人人热书\",\n\t\"url\":\"https:\/\/www.rrssk.com\/keywords-{{source.getVariable()}}.html\"\n},\n{\n\t\"name\":\"夸克搜索\",\n\t\"url\":\"https:\/\/quark.sm.cn\/s?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"神马搜索\",\n\t\"url\":\"https:\/\/m.sm.cn\/s?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"搜狗搜索\",\n\t\"url\":\"https:\/\/wap.sogou.com\/web\/searchList.jsp?keyword={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"头条搜索\",\n\t\"url\":\"https:\/\/so.toutiao.com\/search\/?keyword={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"360搜索\",\n\t\"url\":\"https:\/\/m.so.com\/s?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"必应搜索\",\n\t\"url\":\"https:\/\/cn.bing.com\/search?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"百度搜索\",\n\t\"url\":\"https:\/\/www.baidu.com\/s?wd={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"yandex搜索\",\n\t\"url\":\"https:\/\/yandex.com\/search\/touch\/?text={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"owlook小说搜索\",\n\t\"url\":\"https:\/\/www.owlook.com.cn\/search?wd={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"完本神站小说搜索\",\n\t\"url\":\"https:\/\/www.sososhu.com\/?q={{source.getVariable()}}&site=mwanbengo\"\n},{\n\t\"name\":\"AU文学聚合搜索\",\n\t\"url\":\"https:\/\/book4.cc\/AU%E6%96%87%E5%AD%A6\/searchword?q={{source.getVariable()}}\"\n\t},\n{\n\t\"name\": \"爱丽书屋\",\n\t\"url\": \"https:\/\/m.ailisw.com\/search\/?keyword={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"搜书网\",\n\t\"url\":\"https:\/\/www.sou.st\/search\/result?wd={{source.getVariable()}}&tab=book\"\n},\n{\n\t\"name\":\"yep搜索\",\n\t\"url\":\"https:\/\/yep.com\/web?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"DuckDuckGo搜索(梯子)\",\n\t\"url\":\"https:\/\/duckduckgo.com\/?q={{source.getVariable()}}&t=h_\"\n},\n{\n\t\"name\":\"mojeek搜索(梯子)\",\n\t\"url\":\"https:\/\/www.mojeek.com\/search?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"谷歌搜索(梯子)\",\n\t\"url\":\"https:\/\/www.google.com\/search?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"ecosia搜索(梯子)\",\n\t\"url\":\"https:\/\/www.ecosia.org\/search?q={{source.getVariable()}}\"\n},\n{\n\t\"name\":\"brave搜索(梯子)\",\n\t\"url\":\"https:\/\/search.brave.com\/search?q={{source.getVariable()}}\"\n}\n];\n\nlabels?list.concat(labels.split(\/\\s+\/).map(it=>{\n\tconst href=it.split(\"::\");\n\treturn {\"name\":href[0],\"url\":href[1]}\n})):list",
"ruleLink": "url",
"ruleTitle": "name",
"showWebLog": false,
"singleUrl": false,
"sourceComment": "以如下格式设置源变量,可在列表后追加任意多个书签和搜索引擎\n\n夸克搜索::https:\/\/quark.sm.cn\/s?q={{source.getVariable()}}",
"sourceGroup": "🔍搜索",
"sourceIcon": "https:\/\/5b0988e595225.cdn.sohucs.com\/q_70,c_zoom,w_640\/images\/20180118\/22271e695f5f48a89795e2b9858f5008.jpeg",
"sourceName": "聚合搜索",
"sourceUrl": "https:\/\/www.baidu.com",
"type": 0
}