古诗文网增强

一个增强古诗文网功能的插件

目前为 2023-05-21 提交的版本。查看 最新版本

// ==UserScript==
// @name         古诗文网增强
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  一个增强古诗文网功能的插件
// @author       haozexu
// @match        https://*.gushiwen.cn/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=gushiwen.cn
// @grant        none
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @license      GPL v3.0
// ==/UserScript==

(function() {
    'use strict';
    function showErwema(){
        console.log("")
    }
    if(window.showErweima!=undefined){
    var nsfun = new Function('return ' + window.showErweima.toString())();
    window.showErweima=showErwema;
    var lnk = document.createElement("a");
    var node = document.createTextNode("登录");
    lnk.appendChild(node);
    lnk.onclick=nsfun;console.log("[HzxScript]Login popup blocked");
    var element = document.getElementsByClassName("son1")[0];
    element.appendChild(lnk);
    }
    $("div.right").ready(function(){
    $("div.abcd").remove();$(".juzioncont").remove();
    $("div#btmwx").remove();
    $("div.right").style="background-color:#F0EFE2";
    var text="<div style=\"background-color:#F0EFE2;margin-top:20px;padding-top:20px;padding-bottom:20px;text-align:center\"><h1 style=\"font-size:x-large\">HzxScript已关闭广告</h1><br><p>HzxScript:古诗文网优化工具 - <a href=\"hzxhzx.rth1.one\">haozexu</a></p></div>"

    $("div.main3 div.right").append(text);
    console.log("[HzxScript]Ads blocked");})
})();