图书馆评论区

图书馆评论区接入

目前為 2023-05-12 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/465118/1189579/%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.3
  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. // @require https://unpkg.com/sweetalert/dist/sweetalert.min.js
  12. // @require https://cdn.jsdelivr.net/npm/lil-gui@0.16
  13. // @require https://cdn.jsdelivr.net/npm/tldjs@2.3.1/tld.min.js
  14. // @license 616 SB License
  15. // ==/UserScript==
  16.  
  17. (function () {
  18. "use strict";
  19. setInterval(() => {
  20. if (document.querySelector(".el-button--primary")) {
  21. if (
  22. JSON.parse(localStorage.getItem("twikoo")).link ==
  23. "https://shequ.codemao.cn/user/undefined"
  24. ) {
  25. document
  26. .querySelector(".el-button--primary")
  27. .setAttribute("disabled", "disabled");
  28. } else {
  29. document
  30. .querySelector(".el-button--primary")
  31. .removeAttribute("disabled");
  32. }
  33. }
  34. if (
  35. document.querySelector("div.index__novel-chapter___Avuy1") &&
  36. !document.querySelector("#twikoo.twikoo")
  37. ) {
  38. $("div.index__novel-chapter___Avuy1").after(`
  39. <div id="tcomment"></div>
  40. <script src="https://static.codemao.cn/coco/player/unstable/SyJZEcsE2.text/javascript?hash=Fl9S-s2jX87tcyVRje7MS2gVK2hj"></script>
  41. <script>
  42. twikoo.init({
  43. envId: 'https://bcm-library.zeabur.app/',
  44. el: '#tcomment',
  45. })
  46. </script>
  47. `);
  48. }
  49. }, 100);
  50. })();

QingJ © 2025

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