[{"bookSourceComment":"\/\/ 搜索模式筛选配置：在下方引号中填写搜索模式（普通\/标签），为空时默认普通搜索\n\/\/ 用法：\n\/\/ 1. 普通搜索（按书名\/作者）：筛选=\"普通\"\n\/\/ 2. 标签搜索（按标签）：筛选=\"标签\"\n\/\/ 3. 每次修改后需【刷新发现页】生效\n筛选=\"普通\";\n","bookSourceGroup":"正版小说 书源","bookSourceName":"爱巴士(登录,可🔍标签)","bookSourceType":0,"bookSourceUrl":"https:\/\/www.ibus2333.com\/","customButton":false,"customOrder":0,"enabled":true,"enabledCookieJar":true,"enabledExplore":true,"eventListener":false,"exploreUrl":"@js: \neval(String(source.bookSourceComment));\nvar searchMode = 筛选 || \"普通\"; \/\/ 默认为普通搜索\n\n\/\/ 定义搜索模式对应的参数（普通=3，标签=4，适配网站接口）\nvar modeParam = {\"普通\":3, \"标签\":4};\nvar currentParam = modeParam[searchMode] || 3;\n\n\/\/ 构建发现页内容\nvar result = [];\nvar push = (title, url, size) => result.push({\n  \"title\": title,\n  \"url\": url,\n  \"style\": {\"layout_flexBasisPercent\": size || 1}\n});\n\n\/\/ 显示当前搜索模式\npush(`当前搜索模式：${searchMode}（修改注释后刷新生效）`, null, 1);\npush(\"——— 分类导航 ———\", null, 1);\n\nvar categoryPage = java.ajax(source.bookSourceUrl + \"category\");\nif (categoryPage) {\n  var categories = org.jsoup.Jsoup.parse(categoryPage).select(\".list a\");\n  for (var i=0; i<categories.size(); i++) {\n    var cat = categories.get(i);\n    var catTitle = new String(cat.text()).replaceAll(\"\\s\", \"\");\n    var catUrl = \"https:\" + cat.attr(\"href\");\n    if (catUrl.indexOf(\"?\") > -1) {\n      catUrl += `&searchMode=${searchMode}`;\n    } else {\n      catUrl += `?searchMode=${searchMode}`;\n    }\n    push(catTitle, catUrl + \"_{{page}}\", 0.4);\n  }\n} else {\n  push(\"⚠️ 分类加载失败\", null, 1);\n}\n\nJSON.stringify(result);","header":"{\n  \"User-Agent\":\"Mozilla\/5.0 (Linux; Android 12.0; wv) AppleWebKit\/603.1.30 (KHTML, like Gecko) Version\/4.0 Chrome\/100.0.2987.108 Mobile Safari\/537.36\" \n}","lastUpdateTime":"1783665190708","loginUrl":"https:\/\/www.ibus2333.com\/user\/login","respondTime":180000,"ruleBookInfo":{"author":"[property$=author]@content||.auth@text","intro":"[property$=description]@content||.intro p@text","kind":"tags||.tags a@text","name":"[property$=book_name]@content||h1@text","tocUrl":".g-nav-control@a.0@href||a[href~=catalog]@href"},"ruleContent":{"content":"$.data.content_data\n@js:\nvar res = result || '';\nvar m = res.match(\/\\[\"(.*)\"\\]\/);\nif(m && m[1]){\n  result = m[1].split(\"\\\",\\\"\").join(\"\\n\");\n  result = result.replace(\/<[^>]+>\/g, '').trim();\n}else{\n  result = res.replace(\/<[^>]+>\/g, '').trim();\n}\n","replaceRegex":"##\\n.*华丽的分割线[\\s\\S]*"},"ruleExplore":{"author":"h2@text##.*by","bookList":".g-list@li","bookUrl":"a.0@href##^##https:","kind":".tags span@text","name":"h2@text##by.*"},"ruleSearch":{"author":"$.auth","bookList":"$.data.list","bookUrl":"https:\/\/www.ibus2333.com\/novel\/{{$._id}}","kind":"$.tags","name":"$.name"},"ruleToc":{"chapterList":".list li a||.list a","chapterName":"text\n@js:\nvar name = result.replace(\/[\\r\\n\\t]+\/g, '').trim();\nname = name.replace(\/【.*?】\/g, '').replace(\/\\s+\/g, ' ');\nresult = name;","chapterUrl":"href\n@js:\ntry {\n  var rawUrl = result.startsWith('http') ? result : source.bookSourceUrl + result;\n  var id = rawUrl.match(\/chapter\\\/(.+)\\.html\/)[1];\n  var burl = 'https:\/\/www.ibusread.com\/api\/chapter\/detail,';\n  var body = 'id=' + id;\n  var head = { \"referer\": rawUrl };\n  var option = JSON.stringify({\n    method: \"POST\",\n    body: body,\n    headers: head\n  });\n  result = burl + option;\n} catch(e) {\n  java.log(e);\n  result = result.startsWith('http') ? result : source.bookSourceUrl + result;\n} finally {\n  result;\n}","nextTocUrl":".section-list@li@a@href||.section-list@a@href"},"searchUrl":"<js>\n\neval(String(source.bookSourceComment));\nvar searchMode = 筛选 || \"普通\";\nvar modeParam = {\"普通\":3, \"标签\":4};\nvar currentType = modeParam[searchMode] || 3;\n\nvar sckey = org.jsoup.Jsoup.parse(java.ajax(source.bookSourceUrl + \"search\")).select(\".page-search\").attr(\"data-id\");\njava.log(\"搜索模式：\" + searchMode + \"，类型参数：\" + currentType);\n\nvar body = {\n  \"body\": `name=${encodeURIComponent(key)}&tags=&type=${currentType}&tt=&page_index=${page}&app=2&searchkey=${sckey}`,\n  \"headers\":{\"Referer\": source.bookSourceUrl},\n  \"method\": \"POST\"\n};\nresult = source.bookSourceUrl + \"api\/search\/list\" + \",\" + JSON.stringify(body);\nresult;\n<\/js>","weight":0}]