图书馆评论区

图书馆评论区接入

目前为 2023-08-02 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/465118/1229105/%E5%9B%BE%E4%B9%A6%E9%A6%86%E8%AF%84%E8%AE%BA%E5%8C%BA.js

  1. // ==UserScript==
  2. // @name 图书馆评论区
  3. // @namespace https://shequ.codemao.cn/user/438403
  4. // @version 1.0.4
  5. // @description 图书馆评论区接入
  6. // @author 小鱼yuzifu
  7. // @match *://shequ.codemao.cn/*
  8. // @icon https://static.codemao.cn/coco/player/unstable/B1F3qc2Hj.image/svg+xml?hash=FlHXde3J3HLj1PtOWGgeN9fhcba3
  9. // @grant GM_xmlhttpRequest
  10. // @require https://code.jquery.com/jquery-3.6.1.min.js
  11. // @license 616 SB License
  12. // ==/UserScript==
  13.  
  14. (function () {
  15. "use strict";
  16. setInterval(() => {
  17. if (document.querySelector(".el-button--primary")) {
  18. if (
  19. JSON.parse(localStorage.getItem("twikoo")).link ==
  20. "https://shequ.codemao.cn/user/undefined"
  21. ) {
  22. document
  23. .querySelector(".el-button--primary")
  24. .setAttribute("disabled", "disabled");
  25. } else {
  26. document
  27. .querySelector(".el-button--primary")
  28. .removeAttribute("disabled");
  29. }
  30. }
  31. if (
  32. document.querySelector("div.index__novel-chapter___Avuy1") &&
  33. !document.querySelector("#twikoo.twikoo")
  34. ) {
  35. $("div.index__novel-chapter___Avuy1").after(`
  36. <div id="tcomment"></div>
  37. <script src="https://static.codemao.cn/coco/player/unstable/SyJZEcsE2.text/javascript?hash=Fl9S-s2jX87tcyVRje7MS2gVK2hj"></script>
  38. <script>
  39. twikoo.init({
  40. envId: 'https://bcm-library.yzf.moe/',
  41. el: '#tcomment',
  42. })
  43. </script>
  44. `);
  45. }
  46. }, 100);
  47. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址