书山书荒广场

https://www.baidu.com/书山书荒广场

分享者: 书山 (1935)发布时间: 1天前

原作者 未知
二改:
  世界有多大 (翻页)
  梓澄qwq (个人推荐, js注入, 拦截跳转)
  Folltoshe (js注入)
  柚屿 (完善登录)
  清词 (失效修复,修复有书籍无法点击跳转的情况,加强过滤)
二维码导入
{
    "articleStyle": 0,
    "customOrder": 0,
    "enableJs": true,
    "enabled": true,
    "enabledCookieJar": true,
    "header": "{\"X-Novel-Token\": \"QING_READ_2025\"}",
    "injectJs": "const host = document.location.host;\nconst path = document.location.pathname;\nconst params = new URLSearchParams(window.location.search);\nconst currentUrl = window.location.href;\nconst url = new URL(currentUrl);\n\n\/\/ 域名重定向\nif (host === 'changdunovel.com' && path.endsWith('share-v2.html')) {\n  const bookid = params.get('book_id');\n  if (bookid) {\n    document.location.href = `https:\/\/fanqienovel.com\/page\/${bookid}`;\n  }\n}\n\nconst adBlockSystem = setInterval(() => {\n  const shouldSkip = (el) => {\n    return el.closest('.horizontal-slip-modal-card') || \n           el.closest('.topic-comment-item.new-card-style');\n  };\n document.querySelectorAll('.page-reader-btn.download, .download-btn, .app-download-popup, .download-app')\n    .forEach(el => {\n      if (!shouldSkip(el) && el.textContent.match(\/下载|APP|安装\/)) {\n        el.remove();\n      }\n    });\n  document.querySelectorAll('.mask, .popup-layer, .modal-backdrop, .popup-container')\n    .forEach(el => {\n      if (!shouldSkip(el)) {\n        el.remove();\n      }\n    });\n  document.querySelectorAll('.float-ad, .bottom-ad, .fixed-ad')\n    .forEach(ad => {\n      if (!shouldSkip(ad)) {\n        ad.remove();\n      }\n    });\n}, 500);\n\nconst fixBookClick = setInterval(() => {\n  const shouldSkip = (el) => {\n    return el.closest('.horizontal-slip-modal-card') || \n           el.closest('.topic-comment-item.new-card-style');\n  };\n  \n  document.querySelectorAll('.horizontal-slip-books-item').forEach(item => {\n    if (shouldSkip(item)) return;\n    \n    item.style.pointerEvents = 'auto';\n    item.style.cursor = 'pointer';\n    \n    if (item.id && !item.hasAttribute('data-click-fixed')) {\n      item.setAttribute('data-click-fixed', 'true');\n      item.addEventListener('click', (e) => {\n        e.preventDefault();\n        window.location.href = `https:\/\/fanqienovel.com\/page\/${item.id}`;\n      });\n    }\n  });\n  \n  document.querySelectorAll('div.books-fold-card-book-item.marrow-book-item').forEach(item => {\n    if (shouldSkip(item)) return;\n    \n    item.style.pointerEvents = 'auto';\n    item.style.cursor = 'pointer';\n    \n    const bookId = item.getAttribute('data-book-id') || item.id;\n    if (bookId && !item.hasAttribute('data-click-fixed')) {\n      item.setAttribute('data-click-fixed', 'true');\n      item.addEventListener('click', (e) => {\n        e.preventDefault();\n        window.location.href = `https:\/\/fanqienovel.com\/page\/${bookId}`;\n      });\n    }\n  });\n}, 1000);\n\nconst paginationSystem = setInterval(() => {\n  const shareBottom = document.querySelector(\".share-bottom-button\");\n  const shouldSkip = (el) => {\n    return el && (el.closest('.horizontal-slip-modal-card') || \n                 el.closest('.topic-comment-item.new-card-style'));\n  };\n  \n  if (shareBottom && !shouldSkip(shareBottom)) {\n    shareBottom.remove();\n    const shareApp = document.querySelector(\".share-end-href-app\");\n    const offset = Number(url.searchParams.get('offset') || \"0\");\n    \n    if (shareApp && !shouldSkip(shareApp)) {\n      shareApp.parentNode.innerHTML = `\n        <div class=\"share-end-href-app\" style=\"display:flex;justify-content:center;gap:20px;padding:12px 0;\">\n          ${offset === 0 ? \"\" : `<a style=\"padding:8px 16px;border-radius:4px;background:#f0f0f0;color:#333;text-decoration:none;\" onclick=\"changePage(${offset-1}, url)\">上一页<\/a>`}\n          <span style=\"padding:8px 16px;color:#666;\">${offset+1}<\/span>\n          <a style=\"padding:8px 16px;border-radius:4px;background:#f0f0f0;color:#333;text-decoration:none;\" onclick=\"changePage(${offset+1}, url)\">下一页<\/a>\n        <\/div>\n      `;\n    }\n  }\n}, 1000);\n\nfunction changePage(value, url) {\n  url.searchParams.set('offset', value);\n  location.replace(url);\n}\n\nconst style = document.createElement('style');\nstyle.textContent = `\n  .page-reader-btn.download:not(.horizontal-slip-modal-card *):not(.topic-comment-item.new-card-style *),\n  .download-btn:not(.horizontal-slip-modal-card *):not(.topic-comment-item.new-card-style *),\n  .app-download-popup:not(.horizontal-slip-modal-card *):not(.topic-comment-item.new-card-style *) {\n    display: none !important;\n    visibility: hidden !important;\n    pointer-events: none !important;\n    opacity: 0 !important;\n  }\n  \n  .topic-comment-item:not(.new-card-style):not(.horizontal-slip-modal-card *) {\n    pointer-events: none !important;\n    user-select: none !important;\n  }\n  \n  .horizontal-slip-books-item:not(.horizontal-slip-modal-card *):not(.topic-comment-item.new-card-style *),\n  div.books-fold-card-book-item.marrow-book-item:not(.horizontal-slip-modal-card *):not(.topic-comment-item.new-card-style *) {\n    pointer-events: auto !important;\n    cursor: pointer !important;\n  }\n`;\ndocument.head.appendChild(style);\n\nsetTimeout(() => {\n  clearInterval(adBlockSystem);\n  clearInterval(fixBookClick);\n}, 30000);",
    "jsLib": "let apiNode = 'https:\/\/fqapi.shusan.icu'\n\nfunction getkey() {\n\t\n    return java.base64Encode(Map('密匙'));\n}\n\nfunction checkSum(s) {\n  return String(java.lang.String(s).hashCode())\n}",
    "lastUpdateTime": 1760705780583,
    "loadWithBaseUrl": false,
    "loginUi": "[\n  {\n    \"name\": \"🍅账号登录🍅\",\n    \"type\": \"button\",\n    \"action\": \"webLogin()\",\n    \"style\": {\n    \"layout_flexGrow\": 1,\n    \"layout_flexBasisPercent\": 0.4\n  }\n  },\n  {\n    \"name\": \"❌退出登录❌\",\n    \"type\": \"button\",\n    \"action\": \"logOut()\",\n    \"style\": {\n    \"layout_flexGrow\": 1,\n    \"layout_flexBasisPercent\": 0.4\n  }\n  },{\n  \"name\": \"登录推荐系统\",\n  \"type\": \"button\",\n  \"action\": \"tj()\",\n  \"style\": {\n    \"layout_flexGrow\": 1,\n    \"layout_flexBasisPercent\": 0.4\n   }\n  },{\n    \"name\": \"🧤密匙查询🧤\",\n    \"type\": \"button\",\n    \"action\": \"cx()\",\n    \"style\": {\n      \"layout_flexGrow\": 1,\n      \"layout_flexBasisPercent\": 0.4\n    }\n  },{\n    \"name\": \"🧭订阅源更新\",\n    \"type\": \"button\",\n    \"action\": \"version()\",\n     \"style\": {\n      \"layout_flexGrow\": 1,\n      \"layout_flexBasisPercent\": 0.4\n    }\n   },{\n    \"name\": \"密匙\",\n    \"type\": \"password\",\n    \"action\": \"\"\n  },{\n    \ttype: \"text\",\n    \tname: \"LoginToken\"\n  }\n]",
    "loginUrl": "const LOCAL_VERSION = \"2.6\";\n\nfunction webLogin() {\n    try { \t  java.startBrowserAwait(\"https:\/\/fanqienovel.com\/\", \"登录\");\n    } catch (e) {\n        java.toast(e);\n    }\n    try {\n        cookie.removeCookie(\"snssdk.com\");\n    } catch (e) {}\n    \n    let cookieHeader = String(cookie.getCookie('fanqienovel.com'));\njava.toast(cookieHeader);\n    \n    const match = cookieHeader.match(\/sessionid=([^;]+)\/);\n    java.toast(match);\n    let sessionId = match ? match[1] : null;\n\n    let cookieString = sessionId ? \"sessionid=\" + sessionId : source.getLoginInfoMap()['手动登录Token'] || \"\";\n    java.toast(cookieString);\n    let user;\n    try {\n        user = JSON.parse(java.ajax(\"https:\/\/fanqienovel.com\/api\/user\/info\/v2,\" + JSON.stringify({\n            method: \"GET\",\n            headers: { \"Cookie\": cookieString }\n        }))).data.name;\n    } catch (e) { \n        java.log(e); \n    }\n    \n    if (!cookieString || cookieString == \"sessionid=\" || !user) {\n        java.toast(\"未获取到登录凭据,登录失败\");\n        return false;\n    }\n    \n    java.toast(\"\\n\\n欢迎 \" + user + \"\\n登录成功!\");\n    return true;\n}\n\nfunction login() {}\nfunction logOut() {\n    cookie.removeCookie(\"fanqienovel.com\");\n    java.toast(\"退出成功\");\n}\n\nfunction version(){ java.startBrowserAwait('https:\/\/search.shusan.icu\/version?aid=dy&id=' + LOCAL_VERSION, \"版本检查\"); }\n\nfunction cx() { java.startBrowserAwait('https:\/\/search.shusan.icu\/cx', \"密匙查询\"); }\n\nfunction tj() {\n    var key = (source.getLoginInfoMap() || {})['密匙']; java.startBrowserAwait('https:\/\/novel.shusan.icu\/login?key=' + java.base64Encode(key), \"书籍推荐\");}",
    "ruleArticles": "<js>\nif (baseUrl.includes('番茄小说')) {\n    let ck = (String(cookie.getKey(\"fanqienovel.com\", \"sessionid\")) ? String(cookie.getKey(\"fanqienovel.com\", \"sessionid\")) : (source.getLoginInfoMap() || {})['LoginToken']) || \"\";\n    function getCellId() {\n        let sInfo = java.ajax(apiNode + \"\/reading\/bookapi\/bookmall\/tab\/v,\" + JSON.stringify({ \n            headers: { Cookie: \"sessionid=\" + ck } \n        }));\n        let cell_id = \"cell_id%253D6914906572011339784%2526\";\n        let body = JSON.parse(sInfo).data.tab_item[0].cell_data[1].cell_data;\n        for (let i of body) {\n            if (typeof i.cell_url !== 'undefined') {\n                cell_id = i.cell_url;\n                break;\n            }\n        }\n        java.log(cell_id);\n        cell_id = cell_id.split(\"cell_id%253D\")[1].split(\"%2526\")[0];\n        java.log(cell_id);\n        return cell_id;\n    }\n    let cell_id = getCellId();\n    java.ajax(apiNode + '\/reading\/bookapi\/bookmall\/tab\/y?cell_id=' + cell_id + ',{\"headers\":{\"Cookie\":\"sessionid=' + ck + '\"}}');\n} else if (baseUrl.includes('fqapi')) {\n    let other = {\n        'data': {\n            'cell_view': {\n                'topic_data': [\n                    {\n                        'topic_desc': {\n                            'topic_title': '点击查看搜索结果',\n                            'topic_id': baseUrl\n                        }\n                    }\n                ]\n            }\n        }\n    };\n    other = JSON.stringify(other);\n} else {\n    let other = {\n        'data': {\n            'cell_view': {\n                'topic_data': [\n                    {\n                        'topic_desc': {\n                            'topic_title': '查看推荐书籍,可直接跳转至阅读',\n                            'topic_id': baseUrl\n                        }\n                    }\n                ]\n            }\n        }\n    };\n    other = JSON.stringify(other);\n}\n<\/js>\n$.data.cell_view.topic_data[*]",
    "ruleImage": "$.topic_desc.topic_cover",
    "ruleLink": "<js>\nlet ruleUrl;\nif (baseUrl.includes('番茄小说')) { \n\truleUrl = `https:\/\/reading.snssdk.com\/wap\/topic-share.html?topic_id={{$.topic_desc.topic_id}}&sort=smart_hot&service_id=6&session_id=0&aid=1967`\n\t} else {\n\t\truleUrl = '{{$.topic_desc.topic_id}}';\n\t\t\/\/java.toast(ruleUrl)\n\t\t}\n\truleUrl\n<\/js>",
    "rulePubDate": "$.topic_desc.topic_content\n@js:\nif (baseUrl.includes('番茄小说')) {\n\tlet data = JSON.parse(result).skeleton.data.replace(\/<\\\/?search_link>\/g, \" \")\nlet select = Packages.org.jsoup.Jsoup.parse(data).select(\"p, span\")\nlet final = Array.from(select).map(p => p.text()).join(\" \")\njava.timeFormat(java.getString('topic_desc.create_time')*1000) + (!Packages.android.text.TextUtils.isEmpty(final) ? (' | ' + final) : '')\n}",
    "ruleTitle": "$.topic_desc.topic_title",
    "shouldOverrideUrlLoading": "function extractBookId(url) {\n    return url.match(\/\\\/page\\\/(\\d+)\/)?.[1] || url.match(\/book_id=(\\d+)\/)?.[1];\n}\n\nif (url.startsWith('legadosearch:\/\/')) { \n    java.searchBook(\n        decodeURIComponent(\n            url.replace('legadosearch:\/\/', '')\n        )\n    )\n}\n\nlet needBreak = false;\nfunction isNewLegado() {\n    try {\n        return !!Packages.io.legado.app.ui.book.manga;\n    } catch(e) {\n        return false; \n    }\n}\n\nif (isNewLegado()) {\n    const bookId = extractBookId(url);\n    if (bookId) {\n        const apiUrl = `https:\/\/api5-normal-sinfonlineb.fqnovel.com\/reading\/bookapi\/multi-detail\/v\/?aid=1967&iid=1&version_code=999&book_id=${bookId}`;\n        const response = JSON.parse(java.ajax(apiUrl)), \n        nam = response.data.book_name || response.data[0].book_name;\n        const b64Url = java.base64Encode(apiUrl);\n        const detailUrl = `https:\/\/search.shusan.icu\/details?url=${b64Url}&source=%E7%95%AA%E8%8C%84%E5%B0%8F%E8%AF%B4&name=${nam}`;\n        java.addBook(detailUrl);\n        needBreak = true;\n    }\n    else if (url.match(\/book_id=\\d+\/) || url.match(\/\\\/page\\\/\\d+\/)) {\n        java.addBook(url);\n        needBreak = true;\n    }\n}\n\nif (url.includes('\/details?')) {\n    let fullUrl = 'https:\/\/search.shusan.icu' + url.match(\/\\\/details\\?.*$\/)[0];\n    fullUrl = fullUrl.replace(\/&aid=1998\/g, '');\n    java.addBook(fullUrl);\n    needBreak = true;\n}\n\n!(url.startsWith('http') || url.startsWith('legado')) || \n url.match(\/\\\/chapter-list\\\/\\d+\/) || \n needBreak;",
    "singleUrl": false,
    "sortUrl": "番茄小说::番茄小说\n书荒搜索::https:\/\/fqapi.shusan.icu\/community?query={{source.getVariable()}}\n书友推荐::https:\/\/novel.shusan.icu",
    "sourceComment": "原作者 未知\n二改:\n  世界有多大 (翻页)\n  梓澄qwq (个人推荐, js注入, 拦截跳转)\n  Folltoshe (js注入)\n  柚屿 (完善登录)\n  清词 (失效修复,修复有书籍无法点击跳转的情况,加强过滤)",
    "sourceIcon": "https:\/\/pnglog.com\/b6ryVY.png",
    "sourceName": "书山书荒广场",
    "sourceUrl": "https:\/\/www.baidu.com\/书山书荒广场"
}
广告