Greasy Fork is available in English.
Hide 'anti-adblock' images on several pages on dragcave.net.
当前为
// ==UserScript==
// @name DragonCave - Anti Anti Adblock
// @author warireku
// @description Hide 'anti-adblock' images on several pages on dragcave.net.
// @grant GM_getValue
// @grant GM.getValue
// @require https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js
// @include https://dragcave.net/*
// @license CC0 1.0 Universal (No Rights Reserved)
// @version 0.1
// @grant none
// @namespace http://greasyfork.icu/users/237709
// ==/UserScript==
var curr_page = location.pathname.split("/")[1];
var is_maint = document.getElementsByClassName("maintenance").length > 0;
//special cases
if (is_maint){
curr_page = "maint";
}
else{
if (curr_page.length === 0){
curr_page = "home";
}
else{
var annual_page = curr_page.match(/^(valentines|halloween|holidays)/);
if (annual_page !== null){
curr_page = annual_page[0];
}
}
}
console.log("DCAAS: curr_page="+curr_page);
switch(curr_page){
case "lineage":
GM_addStyle("body > div:first-child > div:nth-child(2) > div:nth-last-child(2){display:none;}");
break;
case "home":
case "abandoned":
case "account":
case "actions":
case "badges":
case "code2":
case "dragonopedia":
case "dragons":
case "easter":
case "graveyard":
case "group":
case "halloween":
case "help":
case "holidays":
case "locations":
case "makeallmyeggsgold":
case "market":
case "raffle":
case "teleport":
case "terms":
case "terms-purchases":
case "thuwed":
case "trading":
case "trickortreat":
case "user":
case "userdesc":
case "valentines":
case "view":
case "wilderness":
case "%E0%B2%A0_%E0%B2%A0":
default:
GM_addStyle("#middle > div:nth-last-child(2){display:none;}");
break;
}