Hide ads elements Fly.inc

Full Hide ads elements Fly.inc

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Hide ads elements Fly.inc
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Full Hide ads elements Fly.inc
// @author       Alberto
// @match        *://*/*
// @license      MIT
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var globalRules = [
        { selector: 'form > center', action: 'display: none' },
        { selector: 'form.text.center > center', action: 'display: none' },
        //{ selector: 'center:nth-of-type(1)', action: 'display: none' },
        //{ selector: 'center:nth-of-type(2)', action: 'display: none' },
        //{ selector: 'center:nth-of-type(3)', action: 'display: none' },
        //{ selector: 'center:nth-of-type(4)', action: 'display: none' },
        //{ selector: 'center:nth-of-type(5)', action: 'display: none' },
        { selector: 'center:nth-of-type(6)', action: 'display: none' },
        { selector: '.a', action: 'display: none' }
    ];

    var currentHostname = window.location.hostname;

    var allowedPages = [
        'allcryptoz.net',
        'batmanfactor.com',
        'crewus.net',
        'gametechreviewer.com',
        'misterio.ro',
        'phineypet.com',
        'rsadnetworkinfo.com',
        'rseducationinfo.com',
        'rshostinginfo.com',
        'rsfinanceinfo.com',
        'rsinsuranceinfo.com',
        'rssoftwareinfo.com',
        'shinbhu.net',
        'talkforfitness.com',
        'techedifier.com',
        'thumb8.net',
        'thumb9.net',
        'topcryptoz.net',
        'ultraten.net',
        'uniqueten.net'
    ];

    allowedPages.sort();

    if (allowedPages.includes(currentHostname)) {
        globalRules.forEach(function(rule) {
            var elementsToHide = document.querySelectorAll(rule.selector);
            elementsToHide.forEach(function(element) {
                element.style = rule.action;
            });
        });
    }
})();