Greasy Fork

Greasy Fork is available in English.

🔥🔥番茄小说网页版,免费阅读,支持解锁VIP🔥🔥

番茄小说网页版,免费阅读,支持解锁VIP,后续看需求开发是否可以下载

当前为 2024-02-07 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         🔥🔥番茄小说网页版,免费阅读,支持解锁VIP🔥🔥
// @namespace    https://www.softrr.cn/
// @version      1.0.1
// @author       hackhase
// @description  番茄小说网页版,免费阅读,支持解锁VIP,后续看需求开发是否可以下载
// @license      MIT
// @icon         https://p1-tt.byteimg.com/origin/novel-static/a3621391ca2e537045168afda6722ee9
// @match        *://fanqienovel.com/*
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js
// @connect      www.softrr.cn
// @connect      novel.snssdk.com
// @connect      novel.snssdk.com
// @grant        GM_addStyle
// @grant        GM_xmlhttpRequest
// @grant        unsafeWindow
// ==/UserScript==

(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" :root{font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{height:100px}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.modal-wrapper[data-v-ab6d421e]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:9999}.modal[data-v-ab6d421e]{background-color:#fff;padding:20px;border-radius:5px}.header[data-v-ab6d421e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.header h2[data-v-ab6d421e]{margin:0;font-size:20px;font-weight:700}.header button[data-v-ab6d421e]{border:none;background-color:transparent;font-size:20px;cursor:pointer}.content[data-v-ab6d421e]{max-height:400px;overflow:auto;font-size:16px;display:flex;justify-content:space-between}.content .produce p[data-v-ab6d421e]{margin-top:15px}.content .produce .ipt[data-v-ab6d421e]{margin-top:15px;height:30px;border-radius:5px;padding-left:10px}.content .img[data-v-ab6d421e]{display:flex;align-items:center;justify-content:center}.content .img img[data-v-ab6d421e]{width:180px}input[data-v-ab6d421e]::-webkit-input-placeholder{color:#aab2bd;font-size:14px;padding-left:5px}.copy[data-v-58c38b81]{width:160px;position:fixed;right:10px;top:80px;color:#111;z-index:999;display:flex;flex-direction:column}.copy .prase[data-v-58c38b81]{width:80px;height:80px;background-color:red;color:#fff;border-radius:50%;z-index:999}.copy .prase[data-v-58c38b81]:hover{background-color:#87ceeb;color:#fff} ");

(function (vue) {
  'use strict';

  var _GM_xmlhttpRequest = /* @__PURE__ */ (() => typeof GM_xmlhttpRequest != "undefined" ? GM_xmlhttpRequest : void 0)();
  const _export_sfc = (sfc, props) => {
    const target = sfc.__vccOpts || sfc;
    for (const [key, val] of props) {
      target[key] = val;
    }
    return target;
  };
  const _withScopeId = (n) => (vue.pushScopeId("data-v-ab6d421e"), n = n(), vue.popScopeId(), n);
  const _hoisted_1$1 = { class: "modal" };
  const _hoisted_2 = { class: "header" };
  const _hoisted_3 = { class: "content" };
  const _hoisted_4 = { class: "produce" };
  const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "1、扫描右侧公众号,点击关注!", -1));
  const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "2、在软件爬取者后台回复:验证码", -1));
  const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "3、在下方输入框输入获取的验证码后回车", -1));
  const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "img" }, [
    /* @__PURE__ */ vue.createElementVNode("img", {
      src: "https://www.softrr.cn/assets/pqz-daa4b840.jpg",
      alt: ""
    })
  ], -1));
  const _sfc_main$1 = {
    __name: "Model",
    props: {
      title: {
        type: String,
        required: true
      },
      code: {
        type: Number
      }
    },
    setup(__props, { expose: __expose }) {
      const props = __props;
      const visible = vue.ref(false);
      const openModal = () => {
        visible.value = true;
      };
      const closeModal = () => {
        visible.value = false;
      };
      __expose({
        visible,
        openModal,
        closeModal
      });
      const codeValue = vue.ref();
      const enterCode = () => {
        if (codeValue.value == props.code) {
          localStorage.setItem("code", codeValue.value);
          visible.value = false;
          alert("验证成功,请再次点击解析!");
          codeValue.value = "";
        } else {
          alert("验证码错误,请重新输入!");
          codeValue.value = "";
        }
      };
      return (_ctx, _cache) => {
        return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
          class: "modal-wrapper",
          onClick: vue.withModifiers(closeModal, ["self"])
        }, [
          vue.createElementVNode("div", _hoisted_1$1, [
            vue.createElementVNode("div", _hoisted_2, [
              vue.createElementVNode("h2", null, vue.toDisplayString(__props.title), 1),
              vue.createElementVNode("button", { onClick: closeModal }, "X")
            ]),
            vue.createElementVNode("div", _hoisted_3, [
              vue.createElementVNode("div", _hoisted_4, [
                _hoisted_5,
                _hoisted_6,
                _hoisted_7,
                vue.withDirectives(vue.createElementVNode("input", {
                  class: "ipt",
                  type: "text",
                  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => codeValue.value = $event),
                  onKeydown: vue.withKeys(enterCode, ["enter"]),
                  placeholder: "请输入验证码后按回车"
                }, null, 544), [
                  [vue.vModelText, codeValue.value]
                ])
              ]),
              _hoisted_8
            ])
          ])
        ], 512)), [
          [vue.vShow, visible.value]
        ]);
      };
    }
  };
  const Model = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ab6d421e"]]);
  const _hoisted_1 = { class: "copy" };
  const _sfc_main = {
    __name: "App",
    setup(__props) {
      const url = vue.ref("");
      url.value = window.location.href;
      const extractedId = vue.ref();
      var array = url.value.split("/");
      extractedId.value = array[array.length - 1].split("?")[0] ? array[array.length - 1].split("?")[0] : extractedId.value;
      const code = vue.ref();
      const getCode = () => {
        return new Promise(function(resolve, reject) {
          _GM_xmlhttpRequest({
            method: "GET",
            url: `https://www.softrr.cn/crawler/getCode`,
            headers: {
              Referer: "https://www.softrr.cn/",
              "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36"
            },
            onload: function(res) {
              resolve(JSON.parse(res.response).data[0].code);
            },
            onerror: function(error) {
              console.log(error);
            }
          });
        });
      };
      const model = vue.ref("");
      const auto = vue.ref("");
      const content = vue.ref("");
      const getContent = () => {
        _GM_xmlhttpRequest({
          method: "GET",
          url: `https://novel.snssdk.com/api/novel/book/reader/full/v1/?device_platform=android&parent_enterfrom=novel_channel_search.tab.&aid=2329&platform_id=1&group_id=${extractedId.value}&item_id=${extractedId.value}`,
          headers: {
            "Content-Type": "application/json"
          },
          onload: function(res) {
            content.value = JSON.parse(res.response).data.content;
            var vip = document.querySelector(".muye-to-vip");
            document.querySelector(".muye-to-fanqie").style.display = "none";
            vip.style.display = "none";
            var muye = document.querySelector(".muye-reader-content");
            muye.innerHTML = content.value;
            document.querySelector("header").style.display = "none";
            url.value = window.location.href;
          },
          onerror: function(error) {
            console.log(error);
          }
        });
      };
      vue.onMounted(async () => {
        code.value = await getCode();
        auto.value.click();
      });
      const onPrase = () => {
        let locaCode = localStorage.getItem("code") || "";
        if (locaCode == code.value) {
          getContent();
        } else {
          model.value.openModal();
        }
      };
      var lastBtn = document.querySelector(".last");
      lastBtn.addEventListener("click", function() {
        auto.value.click();
        auto.value.click();
      });
      var nextBtn = document.querySelector(".next");
      nextBtn.addEventListener("click", function() {
        auto.value.click();
        auto.value.click();
      });
      const title = vue.ref("为了减少端口压力,防止滥用,采取必要的验证手段。");
      return (_ctx, _cache) => {
        return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
          vue.createElementVNode("button", {
            onClick: onPrase,
            class: "prase",
            ref_key: "auto",
            ref: auto
          }, "解析", 512),
          vue.createVNode(Model, {
            title: title.value,
            code: code.value,
            ref_key: "model",
            ref: model
          }, null, 8, ["title", "code"])
        ]);
      };
    }
  };
  const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-58c38b81"]]);
  const app = vue.createApp(App);
  app.mount(
    (() => {
      const app2 = document.createElement("div");
      document.body.append(app2);
      return app2;
    })()
  );

})(Vue);