图书馆评论区

图书馆评论区接入

02.08.2023 itibariyledir. En son verisyonu görün.

Bu script direkt olarak kurulamaz. Başka scriptler için bir kütüphanedir ve meta yönergeleri içerir // @require https://update.greasyfork.org/scripts/465118/1229105/%E5%9B%BE%E4%B9%A6%E9%A6%86%E8%AF%84%E8%AE%BA%E5%8C%BA.js

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         图书馆评论区
// @namespace    https://shequ.codemao.cn/user/438403
// @version      1.0.4
// @description  图书馆评论区接入
// @author       小鱼yuzifu
// @match        *://shequ.codemao.cn/*
// @icon         https://static.codemao.cn/coco/player/unstable/B1F3qc2Hj.image/svg+xml?hash=FlHXde3J3HLj1PtOWGgeN9fhcba3
// @grant        GM_xmlhttpRequest
// @require      https://code.jquery.com/jquery-3.6.1.min.js
// @license      616 SB License
// ==/UserScript==

(function () {
  "use strict";
  setInterval(() => {
    if (document.querySelector(".el-button--primary")) {
      if (
        JSON.parse(localStorage.getItem("twikoo")).link ==
        "https://shequ.codemao.cn/user/undefined"
      ) {
        document
          .querySelector(".el-button--primary")
          .setAttribute("disabled", "disabled");
      } else {
        document
          .querySelector(".el-button--primary")
          .removeAttribute("disabled");
      }
    }
    if (
      document.querySelector("div.index__novel-chapter___Avuy1") &&
      !document.querySelector("#twikoo.twikoo")
    ) {
      $("div.index__novel-chapter___Avuy1").after(`
      <div id="tcomment"></div>
      <script src="https://static.codemao.cn/coco/player/unstable/SyJZEcsE2.text/javascript?hash=Fl9S-s2jX87tcyVRje7MS2gVK2hj"></script>
      <script>
        twikoo.init({
          envId: 'https://bcm-library.yzf.moe/',
          el: '#tcomment',
        })
      </script>
    `);
    }
  }, 100);
})();