图书馆评论区

图书馆评论区接入

2023-04-29 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/465118/1183209/%E5%9B%BE%E4%B9%A6%E9%A6%86%E8%AF%84%E8%AE%BA%E5%8C%BA.js

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         图书馆评论区
// @namespace    https://shequ.codemao.cn/user/438403
// @version      1.0.0
// @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
// @require      https://unpkg.com/sweetalert/dist/sweetalert.min.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]
// @require      https://cdn.jsdelivr.net/npm/[email protected]/tld.min.js
// @license      616 SB License
// ==/UserScript==

(function () {
    'use strict';
    setInterval(() => {
        if (document.querySelector(".wl-footer .wl-info .wl-btn.primary")) {
            if (JSON.parse(localStorage.getItem("WALINE_USER_META")).link == "https://shequ.codemao.cn/user/undefined") {
                document.querySelector(".wl-footer .wl-info .wl-btn.primary").setAttribute("disabled", "disabled")
            }
            else {
                document.querySelector(".wl-footer .wl-info .wl-btn.primary").removeAttribute("disabled")
            }
        }
        if (document.querySelector("div.index__novel-chapter___Avuy1") && !document.querySelector("#waline")) {
            $("div.index__novel-chapter___Avuy1").after(`
      <link
    rel="stylesheet"
    href="https://unpkg.com/@waline/client@v2/dist/waline.css"
  />
      <div id='waline'></div>
      <script type="module">
    import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs';

    init({
      el: '#waline',
      serverURL: 'https://aquamarine-tartufo-42dac6.netlify.app/.netlify/functions/comment',
      meta:[],
      login:'disable',
      copyright:false
    });
  </script>
      `)
        }
    }, 100)
})();