Greasy Fork

来自缓存

Greasy Fork is available in English.

飘天文学

去除飘天文学广告

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         飘天文学
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  去除飘天文学广告
// @license      MIT
// @author       xiao la ji
// @match        https://www.piaotia.com/html/*
// @include      https://www.piaotia.com/html/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=piaotia.com
// ==/UserScript==

(function() {
    'use strict';
    var div = document.getElementById('content').style.fontSize = '20px';
    var tables = document.getElementsByTagName('table');
    for(var i = 0; i < tables.length; i++) {
        var elementTable = tables[i];
        elementTable.style.display = 'none'
    }
    document.onkeydown = function(e) {
        if(e.key == 'd') {
            console.log(document.getElementsByClassName('bottomlink'))
            let ATagArr = document.getElementsByClassName('bottomlink')[0].getElementsByTagName('a')
            let a = document.createElement('a')
            a.setAttribute('href', ATagArr[5].href);
            document.body.appendChild(a);
            a.click();
        }
        if(e.key == 'a') {
            console.log(document.getElementsByClassName('bottomlink'))
            let ATagArr = document.getElementsByClassName('bottomlink')[0].getElementsByTagName('a')
            let a = document.createElement('a')
            a.setAttribute('href', ATagArr[0].href);
            document.body.appendChild(a);
            a.click();
        }
        if(e.key == 'D') {
            console.log(document.getElementsByClassName('bottomlink'))
            let ATagArr = document.getElementsByClassName('bottomlink')[0].getElementsByTagName('a')
            let a = document.createElement('a')
            a.setAttribute('href', ATagArr[5].href);
            document.body.appendChild(a);
            a.click();
        }
        if(e.key == 'A') {
            console.log(document.getElementsByClassName('bottomlink'))
            let ATagArr = document.getElementsByClassName('bottomlink')[0].getElementsByTagName('a')
            let a = document.createElement('a')
            a.setAttribute('href', ATagArr[0].href);
            document.body.appendChild(a);
            a.click();
        }
    }
    setTimeout(() => {
        let img = document.getElementById('exo-im-container-wrapper')
        img.remove()
    }, 3000)
})();