block ads @ diablowiki.net

blocks dynamic ads on diablowiki.net

目前為 2017-02-26 提交的版本,檢視 最新版本

// ==UserScript==
// @name         block ads @ diablowiki.net
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  blocks dynamic ads on diablowiki.net
// @author       You
// @match        https://www.diablowiki.net/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
	adImages = document.querySelectorAll('#ab-bg img, #bottom-abbr img');
	for (var i = 0, len = adImages.length; i < len; i++) {
  		arr[i].src = "";
	}

	elem = document.getElementById('ab-bg');
	if(elem){
		elem.style.display = "none";
	}
	elem = document.getElementById('bottom-abbr');
	if(elem){
		elem.style.display = "none";
	}
})();