Tampermonkey 脚本:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// ==UserScript==
// @name 干掉灰机wiki广告
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description Remove pop-up ads from huijiwiki.
// @author You
// @match *://*.huijiwiki.com/*
// @grant none
// ==/UserScript==

(function() {
'use strict';
//setCookie('fndAds',true,100);
var ads_status = getCookie('fndAds');
if (ads_status == true)
{
//alert('ads cleaned');
return;
}
else{
//alert("cleaning...");
setCookie('fndAds',true,100);
}
// Your code here...
})();
function setCookie(c_name, value, expiredays) {
var exdate = new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie = c_name + "=" + escape(value) + ((expiredays==null) ?
"" :
";expires="+exdate.toUTCString() + ";path=/");
}

function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

也可直接到GreasyFork 安装。