CleanDeviantart

clean invisible publicity and anti-adblock on deviantart

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         CleanDeviantart
// @namespace    http://tampermonkey.net/
// @version      0.1.4.0
// @description  clean invisible publicity and anti-adblock on deviantart
// @author       LordKBX
// @icon http://i.deviantart.net/icons/da_favicon.ico
// @include http://*.deviantart.com/*
// @include https://*.deviantart.com/*
// @grant unsafeWindow
// @grant GM_addStyle
// @grant GM_getResourceText
// @grant GM_openInTab
// @grant GM_info
// @grant GM_getMetadata
// @run-at document-start
// @encoding utf-8
// @license https://creativecommons.org/licenses/by-sa/4.0/
// @homepage https://greasyfork.org/fr/scripts/20856-cleandeviantart
// @contactURL mailto:[email protected]
// @supportURL mailto:[email protected]
// ==/UserScript==
updateInterval = null;
timeInterval = 800;

(function() {
    'use strict';
    updateInterval = setInterval(cleaning, timeInterval);
})();

function cleaning(){
    var item = document.querySelector('img[alt=\"Core\"]');
    if(item !== null){ item.parentNode.parentNode.removeChild(item.parentNode); }
    item = document.querySelector('.mc-ad-chrome');
    if(item !== null){ while(item !== null){ item.parentNode.removeChild(item); item = document.querySelector('.mc-ad-chrome'); } }
    item = document.querySelector('#block-notice');
    if(item !== null){ item.parentNode.removeChild(item); }
    //promo
    item = document.querySelector('#oh-menu-promo');
    if(item !== null){ item.parentNode.removeChild(item); }
    item = document.querySelector('.gogo-upsell');
    if(item !== null){ item.parentNode.removeChild(item); }
}