古诗文网增强

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

当前为 2023-05-27 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         古诗文网增强
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  一个增强古诗文网功能的插件
// @author       haozexu
// @match        https://*.gushiwen.cn/*
// @icon         https://gitee.com/haozexu/hzx-scripts/raw/master/LogoHzx2023.png
// @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=\"https://greasyfork.org/zh-CN/scripts/466763-%E5%8F%A4%E8%AF%97%E6%96%87%E7%BD%91%E5%A2%9E%E5%BC%BA\">haozexu</a></p></div>"
    $("div.main3 div.right").append(text);
    //var backtop_button="<button id=\"scrollback\" style=\"position:fixed;right:10px;bottom:10px;background-color:gray;height:30px;width:30px\">回到顶部</button>";
    var btn = document.createElement("button");
    var node = document.createTextNode("回到顶部");
    btn.appendChild(node);
    btn.onclick=function(){scrollTo(0,0);};
    $("div.main3").append(btn);
    btn.style="position:fixed;right:10px;bottom:10px;background-color:gray;height:50px;width:50px";
    console.log("[HzxScript]Ads blocked");
    console.log("[HzxScript]Sollback button added");
    })
})();