-
Notifications
You must be signed in to change notification settings - Fork 0
/
behemoth-anti-adblocker-canceller.user.js
33 lines (30 loc) · 1.51 KB
/
behemoth-anti-adblocker-canceller.user.js
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
// ==UserScript==
// @name Behemoth Anti-AdBlocker Canceller
// @name:zh-TW 貝希摩斯廣告過濾反制消除器
// @description This userscript is used to cancel the anti-AdBlock mechanism in m.gamer.com.tw
// @description:zh-TW AdBlock無罪!反抗有理!貝希摩斯廣告過濾反制消除器幫你對抗巴哈姆特電玩資訊站手機版網站那太離譜太超過的廣告過濾反制機制,讓你無須停用AdBlock套件仍可正常瀏覽!
// @namespace http://rjhsiao.me/gmscripts
// @version 1.0
// @author RJ Hsiao
// @downloadURL https://rawgit.com/RJHsiao/behemoth-anti-adblocker-canceller/master/behemoth-anti-adblocker-canceller.user.js
// @updateURL https://rawgit.com/RJHsiao/behemoth-anti-adblocker-canceller/master/behemoth-anti-adblocker-canceller.meta.js
// @supportURL https://github.com/RJHsiao/behemoth-anti-adblocker-canceller
// @license gpl
// @compatible chrome
// @match http://m.gamer.com.tw/home/creationDetail.php?sn=*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var parser = new DOMParser();
var $ = jQuery;
$.get(location.href).done(function(data, textStatus, jqXHR){
if ($("header").length > 0) {
return;
}
var html = parser.parseFromString(data, "text/html");
var body = $(html.body);
body.find("script:last").remove();
document.body.innerHTML = body.html();
});
})();