2015-12-23 13:23:09 +01:00
|
|
|
# Resources to be used as redirect destinations.
|
|
|
|
#
|
|
|
|
# - Each distinct resource entry is separated by an empty line.
|
|
|
|
# - The first line in a resource entry is: token mime-type[;encoding]
|
|
|
|
# - All following lines are the data. An empty line signals the end of the
|
|
|
|
# data.
|
|
|
|
#
|
|
|
|
# If the encoding is absent, the data will be converted to base64, and the
|
|
|
|
# encoding will be set to `;base64`.
|
|
|
|
|
|
|
|
|
|
|
|
# http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
|
|
|
|
1x1-transparent.gif image/gif;base64
|
|
|
|
R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
|
|
|
|
|
|
|
|
|
|
|
|
2x2-transparent.png image/png;base64
|
2015-12-31 18:05:18 +01:00
|
|
|
iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAC0lEQVQI12NgQAcAABIAAe+JVKQAAAAA
|
|
|
|
SUVORK5CYII=
|
2015-12-23 13:23:09 +01:00
|
|
|
|
|
|
|
|
2015-12-31 18:05:18 +01:00
|
|
|
32x32-transparent.png image/png;base64
|
|
|
|
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGklEQVRYw+3BAQEAAACCIP+vbkhAAQAA
|
|
|
|
AO8GECAAAZf3V9cAAAAASUVORK5CYII=
|
2015-12-23 13:23:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
noopcss text/css
|
|
|
|
|
|
|
|
|
|
|
|
noopjs application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
;
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
noopframe text/html
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2016-01-10 23:39:18 +01:00
|
|
|
<head><title></title></head>
|
|
|
|
<body></body>
|
2015-12-23 13:23:09 +01:00
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
hd-main.js application/javascript
|
|
|
|
var L = (function(){
|
2016-01-10 23:39:18 +01:00
|
|
|
var l = {};
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var props = [
|
|
|
|
"pf", "ed", "Qe", "fd", "xh", "Uc", "ef", "zd", "Ad", "Qc", "Ri", "Wc",
|
|
|
|
"Vc", "Xc", "Wg", "rd", "qd", "sd", "Pe", "Id", "Hd", "Jd", "fg", "Fd",
|
|
|
|
"Ed", "Gd", "ek", "Cd", "Bd", "Dd", "Nj", "Sc", "Rc", "Tc", "wg", "xd",
|
|
|
|
"wd", "yd", "fh", "ld", "md", "nd", "Re", "cd", "Pc", "ke", "Yc", "Xg",
|
|
|
|
"jd", "kd", "oh", "ad", "bd", "mi", "gd", "hd", "ae", "dd", "fk", "ij",
|
|
|
|
"ud", "td", "vd", "ig", "od", "pd", "Yd", "$j", "Oc", "bf"
|
|
|
|
];
|
|
|
|
for (var i = 0; i < props.length; i++) {
|
|
|
|
l[props[i]] = noopfn;
|
|
|
|
}
|
|
|
|
return l;
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
|
|
|
|
2016-01-12 17:23:29 +01:00
|
|
|
1216.js application/javascript
|
|
|
|
(function() {
|
2016-01-21 22:25:48 +01:00
|
|
|
//
|
|
|
|
var sto = window.setTimeout;
|
|
|
|
var mysto = function(a, b) {
|
|
|
|
if ( b === 15000 && a.toString().lastIndexOf('function a()', 0) === 0 ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return sto(a, b);
|
|
|
|
};
|
|
|
|
Object.defineProperty(window, 'setTimeout', {
|
|
|
|
get: function() {
|
|
|
|
return mysto;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})();
|
2016-01-12 17:23:29 +01:00
|
|
|
|
|
|
|
|
2015-12-24 00:47:43 +01:00
|
|
|
# fuckadblock defuser
|
2015-12-23 13:23:09 +01:00
|
|
|
fuckadblock.js-3.2.0 application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
//
|
|
|
|
var Fab = function() {};
|
|
|
|
Fab.prototype.check = noopfn;
|
|
|
|
Fab.prototype.clearEvent = noopfn;
|
|
|
|
Fab.prototype.emitEvent = noopfn;
|
|
|
|
Fab.prototype.on = function(a, b) {
|
|
|
|
if ( !a ) { b(); }
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
Fab.prototype.onDetected = function() {
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
Fab.prototype.onNotDetected = function(a) {
|
|
|
|
a();
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
Fab.prototype.setOption = noopfn;
|
2016-01-21 22:25:48 +01:00
|
|
|
window.FuckAdBlock = window.BlockAdBlock = Fab;
|
2016-01-10 23:39:18 +01:00
|
|
|
//
|
2016-01-21 22:25:48 +01:00
|
|
|
window.fuckAdBlock = window.blockAdBlock = new Fab();
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
antiAdBlock.js application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
window.antiAdBlock = {
|
|
|
|
onDetected: function() {
|
|
|
|
;
|
|
|
|
},
|
|
|
|
onNotDetected: function(a) {
|
|
|
|
a();
|
|
|
|
}
|
|
|
|
};
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
# To neutralize GA scripts. The goal is to provide the minimal API
|
|
|
|
# expected by clients of these scripts so that the end users are able
|
|
|
|
# to wholly block GA while minimizing risks of page breakage.
|
|
|
|
# Test cases (need way more):
|
|
|
|
# - https://github.com/chrisaljoudi/uBlock/issues/119
|
|
|
|
|
2016-01-05 00:04:43 +01:00
|
|
|
google-analytics.com/ga.js application/javascript
|
2015-12-23 13:23:09 +01:00
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
//
|
|
|
|
var Gaq = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
Gaq.prototype.Na = noopfn;
|
|
|
|
Gaq.prototype.O = noopfn;
|
|
|
|
Gaq.prototype.Sa = noopfn;
|
|
|
|
Gaq.prototype.Ta = noopfn;
|
|
|
|
Gaq.prototype.Va = noopfn;
|
|
|
|
Gaq.prototype._createAsyncTracker = noopfn;
|
|
|
|
Gaq.prototype._getAsyncTracker = noopfn;
|
|
|
|
Gaq.prototype._getPlugin = noopfn;
|
|
|
|
Gaq.prototype.push = function(a) {
|
|
|
|
if ( typeof a === 'function' ) {
|
|
|
|
a();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
//
|
|
|
|
var tracker = function() {};
|
|
|
|
tracker._getLinkerUrl = function(a) {
|
|
|
|
return a;
|
|
|
|
};
|
|
|
|
//
|
|
|
|
var tracker = {
|
|
|
|
_initData: noopfn,
|
|
|
|
_trackEvent: noopfn,
|
|
|
|
_trackPageview: noopfn
|
|
|
|
};
|
|
|
|
//
|
|
|
|
var Gat = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
Gat.prototype._anonymizeIP = noopfn;
|
|
|
|
Gat.prototype._createTracker = noopfn;
|
|
|
|
Gat.prototype._forceSSL = noopfn;
|
|
|
|
Gat.prototype._getPlugin = noopfn;
|
|
|
|
Gat.prototype._getTracker = function() {
|
|
|
|
return tracker;
|
|
|
|
};
|
|
|
|
Gat.prototype._getTrackerByName = function() {
|
|
|
|
return tracker;
|
|
|
|
};
|
|
|
|
Gat.prototype._getTrackers = noopfn;
|
|
|
|
Gat.prototype.aa = noopfn;
|
|
|
|
Gat.prototype.ab = noopfn;
|
|
|
|
Gat.prototype.hb = noopfn;
|
|
|
|
Gat.prototype.la = noopfn;
|
|
|
|
Gat.prototype.oa = noopfn;
|
|
|
|
Gat.prototype.pa = noopfn;
|
|
|
|
Gat.prototype.u = noopfn;
|
|
|
|
var gat = new Gat();
|
|
|
|
window._gat = gat;
|
|
|
|
//
|
|
|
|
var gaq = new Gaq();
|
|
|
|
(function() {
|
|
|
|
var aa = window._gaq || [];
|
|
|
|
if ( Array.isArray(aa) ) {
|
|
|
|
while ( aa[0] ) {
|
|
|
|
gaq.push(aa.shift());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
window._gaq = gaq.qf = gaq;
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
2016-01-05 00:04:43 +01:00
|
|
|
google-analytics.com/analytics.js application/javascript
|
2015-12-27 07:16:40 +01:00
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
// https://developers.google.com/analytics/devguides/collection/analyticsjs/
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var noopnullfn = function() {
|
|
|
|
return null;
|
|
|
|
};
|
|
|
|
//
|
|
|
|
var Tracker = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var p = Tracker.prototype;
|
|
|
|
p.get = noopfn;
|
|
|
|
p.set = noopfn;
|
|
|
|
p.send = noopfn;
|
|
|
|
//
|
|
|
|
var gaName = window.GoogleAnalyticsObject || 'ga';
|
|
|
|
var ga = function() {
|
|
|
|
var len = arguments.length;
|
|
|
|
if ( len === 0 ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var f = arguments[len-1];
|
|
|
|
if ( typeof f !== 'object' || f === null || typeof f.hitCallback !== 'function' ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
f.hitCallback();
|
|
|
|
} catch (ex) {
|
|
|
|
}
|
|
|
|
};
|
|
|
|
ga.create = function() {
|
|
|
|
return new Tracker();
|
|
|
|
};
|
|
|
|
ga.getByName = noopnullfn;
|
|
|
|
ga.getAll = function() {
|
|
|
|
return [];
|
|
|
|
};
|
|
|
|
ga.remove = noopfn;
|
|
|
|
window[gaName] = ga;
|
2015-12-27 07:16:40 +01:00
|
|
|
})();
|
|
|
|
|
2016-01-18 00:41:11 +01:00
|
|
|
google-analytics.com/inpage_linkid.js application/javascript
|
|
|
|
(function() {
|
|
|
|
window._gaq = window._gaq || {
|
|
|
|
push: function() {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
})();
|
|
|
|
|
2015-12-23 13:23:09 +01:00
|
|
|
# Ubiquitous googletagservices.com: not blocked by EasyPrivacy.
|
|
|
|
# "Tags are tiny bits of website code that let you measure traffic and
|
|
|
|
# "visitor behavior"
|
|
|
|
googletagservices.com/gpt.js application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
var p;
|
|
|
|
// https://developers.google.com/doubleclick-gpt/reference
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var noopthisfn = function() {
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
var noopnullfn = function() {
|
|
|
|
return null;
|
|
|
|
};
|
|
|
|
var nooparrayfn = function() {
|
|
|
|
return [];
|
|
|
|
};
|
|
|
|
var noopstrfn = function() {
|
|
|
|
return '';
|
|
|
|
};
|
|
|
|
//
|
|
|
|
var companionAdsService = {
|
|
|
|
addEventListener: noopthisfn,
|
|
|
|
enableSyncLoading: noopfn,
|
|
|
|
setRefreshUnfilledSlots: noopfn
|
|
|
|
};
|
|
|
|
var contentService = {
|
|
|
|
addEventListener: noopthisfn,
|
|
|
|
setContent: noopfn
|
|
|
|
};
|
|
|
|
var PassbackSlot = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
p = PassbackSlot.prototype;
|
|
|
|
p.display = noopfn;
|
|
|
|
p.get = noopnullfn;
|
|
|
|
p.set = noopthisfn;
|
|
|
|
p.setClickUrl = noopthisfn;
|
|
|
|
p.setTagForChildDirectedTreatment = noopthisfn;
|
|
|
|
p.setTargeting = noopthisfn;
|
|
|
|
p.updateTargetingFromMap = noopthisfn;
|
|
|
|
var pubAdsService = {
|
|
|
|
addEventListener: noopthisfn,
|
|
|
|
clear: noopfn,
|
|
|
|
clearCategoryExclusions: noopthisfn,
|
|
|
|
clearTagForChildDirectedTreatment: noopthisfn,
|
|
|
|
clearTargeting: noopthisfn,
|
|
|
|
collapseEmptyDivs: noopfn,
|
|
|
|
defineOutOfPagePassback: function() { return new PassbackSlot(); },
|
|
|
|
definePassback: function() { return new PassbackSlot(); },
|
|
|
|
disableInitialLoad: noopfn,
|
|
|
|
display: noopfn,
|
|
|
|
enableAsyncRendering: noopfn,
|
|
|
|
enableSingleRequest: noopfn,
|
|
|
|
enableSyncRendering: noopfn,
|
|
|
|
enableVideoAds: noopfn,
|
|
|
|
get: noopnullfn,
|
|
|
|
getAttributeKeys: nooparrayfn,
|
|
|
|
refresh: noopfn,
|
|
|
|
set: noopthisfn,
|
|
|
|
setCategoryExclusion: noopthisfn,
|
|
|
|
setCentering: noopfn,
|
|
|
|
setCookieOptions: noopthisfn,
|
|
|
|
setLocation: noopthisfn,
|
|
|
|
setPublisherProvidedId: noopthisfn,
|
|
|
|
setTagForChildDirectedTreatment: noopthisfn,
|
|
|
|
setTargeting: noopthisfn,
|
|
|
|
setVideoContent: noopthisfn,
|
|
|
|
updateCorrelator: noopfn
|
|
|
|
};
|
|
|
|
var SizeMappingBuilder = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
p = SizeMappingBuilder.prototype;
|
|
|
|
p.addSize = noopthisfn;
|
|
|
|
p.build = noopnullfn;
|
|
|
|
var Slot = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
p = Slot.prototype;
|
|
|
|
p.addService = noopthisfn;
|
|
|
|
p.clearCategoryExclusions = noopthisfn;
|
|
|
|
p.clearTargeting = noopthisfn;
|
|
|
|
p.defineSizeMapping = noopthisfn;
|
|
|
|
p.get = noopnullfn;
|
|
|
|
p.getAdUnitPath = nooparrayfn;
|
|
|
|
p.getAttributeKeys = nooparrayfn;
|
|
|
|
p.getCategoryExclusions = nooparrayfn;
|
|
|
|
p.getDomId = noopstrfn;
|
|
|
|
p.getSlotElementId = noopstrfn;
|
|
|
|
p.getSlotId = noopthisfn;
|
|
|
|
p.getTargeting = nooparrayfn;
|
|
|
|
p.getTargetingKeys = nooparrayfn;
|
|
|
|
p.set = noopthisfn;
|
|
|
|
p.setCategoryExclusion = noopthisfn;
|
|
|
|
p.setClickUrl = noopthisfn;
|
|
|
|
p.setCollapseEmptyDiv = noopthisfn;
|
|
|
|
p.setTargeting = noopthisfn;
|
|
|
|
//
|
|
|
|
var gpt = window.googletag || {};
|
|
|
|
var cmd = gpt.cmd || [];
|
|
|
|
gpt.apiReady = true;
|
|
|
|
gpt.cmd = [];
|
|
|
|
gpt.cmd.push = function(a) {
|
|
|
|
try {
|
|
|
|
a();
|
|
|
|
} catch (ex) {
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
gpt.companionAds = function() { return companionAdsService; };
|
|
|
|
gpt.content = function() { return contentService; };
|
|
|
|
gpt.defineOutOfPageSlot = function() { return new Slot(); };
|
|
|
|
gpt.defineSlot = function() { return new Slot(); };
|
|
|
|
gpt.disablePublisherConsole = noopfn;
|
|
|
|
gpt.display = noopfn;
|
|
|
|
gpt.enableServices = noopfn;
|
|
|
|
gpt.getVersion = noopstrfn;
|
|
|
|
gpt.pubads = function() { return pubAdsService; };
|
|
|
|
gpt.pubadsReady = true;
|
|
|
|
gpt.sizeMapping = function() { return new SizeMappingBuilder(); };
|
|
|
|
window.googletag = gpt;
|
|
|
|
while ( cmd.length !== 0 ) {
|
|
|
|
gpt.cmd.push(cmd.shift());
|
|
|
|
}
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
2016-03-14 02:19:02 +01:00
|
|
|
# Obviously more work needs to be done, but at least for now it takes care of:
|
|
|
|
# - https://twitter.com/kenn_butler/status/709163241021317120
|
|
|
|
googletagmanager.com/gtm.js application/javascript
|
|
|
|
(function() {
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
window.ga = window.ga || noopfn;
|
|
|
|
})();
|
|
|
|
|
2015-12-23 13:23:09 +01:00
|
|
|
|
|
|
|
# https://forums.lanik.us/viewtopic.php?f=91&t=27188
|
|
|
|
i.ligatus.com/*/angular-tag.js application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
self.adProtect = true;
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
# Yavli ads. These are blocked using an inline script tag filter, but this
|
2016-01-06 18:24:44 +01:00
|
|
|
# works only on Firefox. So we side-load the following script for sites
|
|
|
|
# suffering Yavli's click-bait ads.
|
2015-12-23 13:23:09 +01:00
|
|
|
yavli-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-01-15 21:42:36 +01:00
|
|
|
var noopfn = function() {
|
2016-01-16 15:03:24 +01:00
|
|
|
;
|
|
|
|
};
|
2016-01-15 21:42:36 +01:00
|
|
|
var nourl = {
|
|
|
|
set: noopfn,
|
2016-01-10 23:39:18 +01:00
|
|
|
get: function() {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
};
|
|
|
|
try {
|
2016-01-15 21:42:36 +01:00
|
|
|
Object.defineProperty(window, '__durl', nourl);
|
|
|
|
Object.defineProperty(window, '__lsurl', nourl);
|
|
|
|
Object.defineProperty(window, '__lturl', nourl);
|
2016-01-10 23:39:18 +01:00
|
|
|
} catch (ex) {
|
|
|
|
}
|
2016-03-27 16:48:05 +02:00
|
|
|
var aa = ['yz','zp','zx','zy','gj','fj','jf','kj','kp','pk','uj','ju'];
|
2016-01-22 20:03:43 +01:00
|
|
|
var no = {
|
|
|
|
set: noopfn,
|
|
|
|
get: function() {
|
|
|
|
return {
|
|
|
|
start: noopfn
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
while ( aa.length ) {
|
|
|
|
try {
|
|
|
|
Object.defineProperty(window, aa.pop(), no);
|
|
|
|
} catch (e) {
|
|
|
|
}
|
|
|
|
}
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
# Addefend defuser
|
|
|
|
uabinject-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
window.uabpdl = window.uabInject = window.uabDetect = true;
|
2015-12-23 13:23:09 +01:00
|
|
|
})();
|
2015-12-23 20:15:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1094
|
|
|
|
pornhub-popup-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
var w = window;
|
|
|
|
var count = Math.ceil(8+Math.random()*4);
|
|
|
|
var tomorrow = new Date(Date.now() + 86400);
|
|
|
|
var expire = tomorrow.toString();
|
|
|
|
document.cookie = 'FastPopSessionRequestNumber=' + count + '; expires=' + expire;
|
|
|
|
var db;
|
|
|
|
if ( (db = w.localStorage) ) {
|
|
|
|
db.setItem('InfNumFastPops', count);
|
|
|
|
db.setItem('InfNumFastPopsExpire', expire);
|
|
|
|
}
|
|
|
|
if ( (db = w.sessionStorage) ) {
|
|
|
|
db.setItem('InfNumFastPops', count);
|
|
|
|
db.setItem('InfNumFastPopsExpire', expire);
|
|
|
|
}
|
2015-12-23 20:15:53 +01:00
|
|
|
})();
|
2015-12-31 18:05:18 +01:00
|
|
|
|
|
|
|
|
2016-02-04 06:24:36 +01:00
|
|
|
goyavelab-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-02-05 12:25:19 +01:00
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
2016-02-04 06:24:36 +01:00
|
|
|
Object.defineProperty(window, '_$14', {
|
|
|
|
get: function() { return noopfn; },
|
|
|
|
set: noopfn
|
|
|
|
});
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
2015-12-31 18:05:18 +01:00
|
|
|
# https://news.ycombinator.com/item?id=10814913
|
|
|
|
forbes-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-01-21 15:02:16 +01:00
|
|
|
if ( window.location.pathname.lastIndexOf('/forbes/welcome/', 0) !== 0 ) {
|
2016-01-10 23:39:18 +01:00
|
|
|
return;
|
|
|
|
}
|
2016-01-11 19:10:43 +01:00
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var odp = Object.defineProperty;
|
|
|
|
var wad, wadm, abc = function() {};
|
|
|
|
var abcp = abc.prototype;
|
|
|
|
abcp.addCheck = abcp.check = abcp.initialize =
|
|
|
|
abcp.removeCheck = abcp.triggerAdBlockState = noopfn;
|
|
|
|
abcp.getAdBlockState = function() {
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
odp(window, 'WelcomeAd', {
|
|
|
|
get: function() { return wad; },
|
|
|
|
set: function(a) {
|
|
|
|
wad = a;
|
|
|
|
odp(a, 'Modules', {
|
|
|
|
get: function() { return wadm; },
|
|
|
|
set: function(a) {
|
|
|
|
wadm = a;
|
|
|
|
if ( a.AdBlockChecker ) {
|
|
|
|
a.AdBlockChecker = abc;
|
|
|
|
} else {
|
|
|
|
odp(a, 'AdBlockChecker', {
|
|
|
|
get: function() { return abc; },
|
|
|
|
set: function() {}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2016-01-10 23:39:18 +01:00
|
|
|
}
|
|
|
|
});
|
2015-12-31 18:05:18 +01:00
|
|
|
})();
|
2016-01-03 03:26:03 +01:00
|
|
|
|
2016-01-06 18:24:44 +01:00
|
|
|
|
2016-01-03 03:26:03 +01:00
|
|
|
# https://forums.lanik.us/viewtopic.php?f=62&t=25212
|
|
|
|
impspcabe-defuser.js application/javascript
|
|
|
|
(function(){
|
2016-01-10 23:39:18 +01:00
|
|
|
window._impspcabe = false;
|
2016-01-03 03:26:03 +01:00
|
|
|
})();
|
2016-01-08 02:29:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/733
|
|
|
|
wpredirect-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
var twp = window.TWP = window.TWP || {};
|
|
|
|
twp.Identity = twp.Identity || {};
|
|
|
|
twp.Identity.initComplete = true;
|
2016-01-08 02:29:01 +01:00
|
|
|
})();
|
2016-01-09 13:57:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1194
|
|
|
|
openload-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-01-10 23:39:18 +01:00
|
|
|
Object.defineProperty(window, 'preserve', {
|
|
|
|
get: function() { return true; },
|
|
|
|
set: function() {}
|
|
|
|
});
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1136
|
2016-01-12 17:23:29 +01:00
|
|
|
1136.js application/javascript
|
2016-01-10 23:39:18 +01:00
|
|
|
(function() {
|
|
|
|
var wjdmp;
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
2016-03-12 18:07:13 +01:00
|
|
|
var excludes = {
|
|
|
|
'4': ['157','161','175'],
|
2016-03-18 14:08:51 +01:00
|
|
|
'5': ['144']
|
2016-03-12 18:07:13 +01:00
|
|
|
};
|
2016-01-29 17:59:02 +01:00
|
|
|
var wjdmpGet = function() {
|
|
|
|
return wjdmp;
|
|
|
|
};
|
|
|
|
var wjdmpSet = function(a) {
|
|
|
|
wjdmp = function(r, o) {
|
2016-03-12 18:07:13 +01:00
|
|
|
var aa;
|
|
|
|
for ( var excl in excludes ) {
|
|
|
|
if ( excludes.hasOwnProperty(excl) === false ) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if ( r.length !== 1 || r[0].toString() !== excl ) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
aa = excludes[excl];
|
2016-01-10 23:39:18 +01:00
|
|
|
for ( var k in o ) {
|
2016-02-04 00:55:12 +01:00
|
|
|
if ( !o.hasOwnProperty(k) || typeof o[k] !== 'function' ) {
|
2016-02-04 00:49:07 +01:00
|
|
|
continue;
|
2016-01-10 23:39:18 +01:00
|
|
|
}
|
2016-03-18 14:08:51 +01:00
|
|
|
if ( aa.length !== 0 && aa.indexOf(k.toString()) === -1 ) {
|
2016-02-04 00:49:07 +01:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
o[k] = noopfn;
|
2016-01-10 23:39:18 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
a(r, o);
|
|
|
|
};
|
|
|
|
};
|
2016-01-29 17:43:12 +01:00
|
|
|
try {
|
|
|
|
Object.defineProperty(window, 'webpackJsonpdmp', {
|
2016-01-29 17:59:02 +01:00
|
|
|
get: wjdmpGet,
|
|
|
|
set: wjdmpSet
|
2016-01-29 17:43:12 +01:00
|
|
|
});
|
|
|
|
} catch(ex) {
|
|
|
|
}
|
2016-01-09 13:57:50 +01:00
|
|
|
})();
|
2016-01-11 17:29:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
bab-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
var sto = window.setTimeout,
|
|
|
|
re = /\.bab_elementid.$/;
|
|
|
|
window.setTimeout = function(a, b) {
|
|
|
|
if ( typeof a !== 'string' || !re.test(a) ) {
|
2016-03-07 16:17:31 +01:00
|
|
|
return sto(a, b);
|
2016-01-11 17:29:46 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
})();
|
2016-01-13 19:10:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
kissanime-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
Object.defineProperty(window, 'isBlockAds2', {
|
|
|
|
get: function() { return false; },
|
|
|
|
set: function(a) {}
|
|
|
|
});
|
|
|
|
})();
|
2016-01-21 00:18:56 +01:00
|
|
|
|
|
|
|
|
2016-03-13 16:26:23 +01:00
|
|
|
# https://forums.lanik.us/viewtopic.php?f=64&t=22975&start=45#p77969
|
|
|
|
kisscartoon-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
Object.defineProperty(window, '_0x408a', {
|
|
|
|
get: function() { return []; },
|
|
|
|
set: function(a) {}
|
|
|
|
});
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
2016-02-05 16:04:56 +01:00
|
|
|
phenv-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
var phenv = window.PHENV;
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var trapOnDetection = function() {
|
|
|
|
if ( phenv.onDetection === undefined ) {
|
|
|
|
Object.defineProperty(phenv, 'onDetection', {
|
|
|
|
get: function() {
|
|
|
|
return noopfn;
|
|
|
|
},
|
|
|
|
set: noopfn
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
phenv.onDetection = noopfn;
|
|
|
|
};
|
|
|
|
if ( phenv === undefined ) {
|
|
|
|
Object.defineProperty(window, 'PHENV', {
|
|
|
|
get: function() {
|
|
|
|
return phenv;
|
|
|
|
},
|
|
|
|
set: function(a) {
|
|
|
|
phenv = a;
|
|
|
|
trapOnDetection();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
trapOnDetection();
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
2016-01-21 00:18:56 +01:00
|
|
|
scorecardresearch.com/beacon.js application/javascript
|
|
|
|
(function() {
|
|
|
|
window.COMSCORE = {
|
|
|
|
purge: function() {
|
|
|
|
_comscore = [];
|
|
|
|
},
|
|
|
|
beacon: function() {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
})();
|
2016-01-22 01:39:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1250#issuecomment-173533894
|
|
|
|
widgets.outbrain.com/outbrain.js application/javascript
|
|
|
|
(function() {
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var obr = {};
|
2016-02-04 00:49:07 +01:00
|
|
|
var methods = [
|
|
|
|
'callClick', 'callLoadMore', 'callRecs', 'callUserZapping',
|
|
|
|
'callWhatIs', 'cancelRecommendation', 'cancelRecs', 'closeCard',
|
|
|
|
'closeModal', 'closeTbx', 'errorInjectionHandler', 'getCountOfRecs',
|
|
|
|
'getStat', 'imageError', 'manualVideoClicked', 'onOdbReturn',
|
|
|
|
'onVideoClick', 'pagerLoad', 'recClicked', 'refreshSpecificWidget',
|
|
|
|
'refreshWidget', 'reloadWidget', 'researchWidget', 'returnedError',
|
|
|
|
'returnedHtmlData', 'returnedIrdData', 'returnedJsonData', 'scrollLoad',
|
|
|
|
'showDescription', 'showRecInIframe', 'userZappingMessage', 'zappingFormAction'
|
|
|
|
];
|
2016-01-22 01:39:40 +01:00
|
|
|
obr.extern = {
|
|
|
|
video: {
|
|
|
|
getVideoRecs: noopfn,
|
|
|
|
videoClicked: noopfn
|
2016-02-04 00:49:07 +01:00
|
|
|
}
|
2016-01-22 01:39:40 +01:00
|
|
|
};
|
2016-02-04 00:49:07 +01:00
|
|
|
methods.forEach(function(a) {
|
|
|
|
obr.extern[a] = noopfn;
|
|
|
|
});
|
2016-01-22 01:39:40 +01:00
|
|
|
window.OBR = window.OBR || obr;
|
|
|
|
})();
|
2016-01-23 01:47:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1228
|
|
|
|
window.name-defuser application/javascript
|
2016-02-07 01:13:09 +01:00
|
|
|
if ( window === window.top ) {
|
2016-02-19 15:46:42 +01:00
|
|
|
window.name = null;
|
2016-02-07 01:13:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/897#issuecomment-180871042
|
|
|
|
doubleclick.net/instream/ad_status.js application/javascript
|
|
|
|
window.google_ad_status = 1;
|
2016-02-15 21:37:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1384
|
|
|
|
addthis.com/addthis_widget.js application/javascript
|
|
|
|
(function() {
|
2016-02-19 15:46:42 +01:00
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
window.addthis = {
|
|
|
|
addEventListener: noopfn,
|
2016-03-31 05:08:53 +02:00
|
|
|
button: noopfn,
|
2016-02-19 15:46:42 +01:00
|
|
|
init: noopfn,
|
|
|
|
layers: noopfn,
|
|
|
|
toolbox: noopfn,
|
|
|
|
update: noopfn
|
|
|
|
};
|
2016-02-15 21:37:06 +01:00
|
|
|
})();
|
2016-02-19 00:33:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://adblockplus.org/forum/viewtopic.php?f=2&t=43914#p147866
|
|
|
|
wired-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
var sto = window.setTimeout,
|
|
|
|
re = /^function n\(\)/;
|
|
|
|
window.setTimeout = function(a, b) {
|
|
|
|
if ( b !== 50 || !re.test(a.toString()) ) {
|
2016-03-07 16:17:31 +01:00
|
|
|
return sto(a, b);
|
2016-02-19 00:33:30 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
})();
|
2016-02-19 15:46:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1059#issuecomment-185434177
|
|
|
|
# Works for stern.de, will see if reusable.
|
|
|
|
bcplayer-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
var bcPlayer;
|
|
|
|
Object.defineProperty(window, 'bcPlayer', {
|
|
|
|
get: function() {
|
|
|
|
return bcPlayer;
|
|
|
|
},
|
|
|
|
set: function(a) {
|
|
|
|
bcPlayer = a;
|
|
|
|
a.ads = function(a) {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})();
|
2016-02-29 14:36:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://forums.lanik.us/viewtopic.php?f=62&t=27719
|
|
|
|
opensubtitles.org application/javascript
|
|
|
|
(function() {
|
2016-03-23 19:28:29 +01:00
|
|
|
var eval = window.eval;
|
|
|
|
window.eval = function(a) {
|
|
|
|
if ( a.toString().indexOf('defaultCheckForAdBlockExistance') !== -1 ) {
|
|
|
|
return;
|
|
|
|
};
|
|
|
|
return eval(a);
|
|
|
|
};
|
2016-02-29 14:36:27 +01:00
|
|
|
})();
|
2016-03-07 16:17:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Might be useful on some sites to be able to foil all calls to `setTimeout`.
|
|
|
|
# Example of a filter: `example.com##script:inject(setTimeout-defuser)`
|
|
|
|
setTimeout-defuser application/javascript
|
|
|
|
(function() {
|
|
|
|
window.setTimeout = function() {
|
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
})();
|
2016-03-09 19:24:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Completely experimental: load Disqus on demand only. Purpose is to avoid
|
|
|
|
# connecting to Disqus' servers, unless the user explicitly asks for the
|
|
|
|
# comments to be loaded.
|
|
|
|
# Works with following filters:
|
|
|
|
# ||disqus.com/forums/*/embed.js$script,redirect=disqus.com/forums/*/embed.js
|
|
|
|
# ||disqus.com/embed.js$script,redirect=disqus.com/embed.js
|
|
|
|
# ||disqus.com/count.js$script
|
|
|
|
# @@||disqus.com/embed.js?_=1457540*$script
|
|
|
|
# If you want a site you regularly visit to always have the comment loaded,
|
|
|
|
# just use an exception static filter. Example for wired.com:
|
|
|
|
# @@||wired.disqus.com/embed.js
|
|
|
|
|
|
|
|
# Sometimes a site will use this one script:
|
|
|
|
disqus.com/forums/*/embed.js application/javascript
|
|
|
|
(function() {
|
2016-03-12 18:07:13 +01:00
|
|
|
var ee = document.getElementsByTagName('script');
|
|
|
|
var i = ee.length, src;
|
|
|
|
while ( i-- ) {
|
|
|
|
src = ee[i].src || '';
|
|
|
|
if ( src === '' ) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if ( src.lastIndexOf('disqus.com/embed.js') === (src.length - 19) ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var e = document.createElement('script');
|
|
|
|
e.async = true;
|
|
|
|
e.src = '//' + window.disqus_shortname + '.disqus.com/embed.js';
|
|
|
|
document.body.appendChild(e);
|
2016-03-09 19:24:20 +01:00
|
|
|
})();
|
|
|
|
|
|
|
|
# Most use this one though:
|
|
|
|
disqus.com/embed.js application/javascript
|
|
|
|
(function() {
|
2016-03-12 18:07:13 +01:00
|
|
|
var p = document.getElementById(window.disqus_container_id || 'disqus_thread');
|
|
|
|
if ( p === null ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var b = document.createElement('button');
|
|
|
|
b.textContent = 'Disqus blocked by uBlock Origin: click to unblock';
|
|
|
|
b.type = 'button';
|
|
|
|
p.appendChild(b);
|
|
|
|
var loadDisqus = function(ev) {
|
|
|
|
b.removeEventListener('click', loadDisqus);
|
|
|
|
p.removeChild(b);
|
|
|
|
var script = document.createElement('script');
|
|
|
|
script.async = true;
|
|
|
|
var t = Date.now().toString();
|
|
|
|
script.src = '//' + window.disqus_shortname + '.disqus.com/embed.js?_=1457540' + t.slice(-6);
|
|
|
|
document.body.appendChild(script);
|
|
|
|
ev.preventDefault();
|
|
|
|
ev.stopPropagation();
|
|
|
|
};
|
|
|
|
b.addEventListener('click', loadDisqus);
|
2016-03-09 19:24:20 +01:00
|
|
|
})();
|
2016-03-13 14:38:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/gorhill/uBlock/issues/1461
|
|
|
|
ytad-defuser.js application/javascript
|
|
|
|
(function() {
|
2016-03-16 00:38:07 +01:00
|
|
|
var bind = Function.prototype.bind;
|
|
|
|
Function.prototype.bind = function() {
|
|
|
|
'native code';
|
|
|
|
var bound = bind.apply(this, arguments);
|
|
|
|
bound.xpizqvtnrfkcjixkmdnu = this.toString();
|
|
|
|
return bound;
|
|
|
|
};
|
2016-03-14 16:29:26 +01:00
|
|
|
var sto = window.setTimeout;
|
|
|
|
window.setTimeout = function(a, b) {
|
2016-03-15 13:43:44 +01:00
|
|
|
if ( b === 15000 && b < 20000 && 'xpizqvtnrfkcjixkmdnu' in a ) {
|
2016-03-15 13:41:31 +01:00
|
|
|
console.log('uBO>', a.xpizqvtnrfkcjixkmdnu);
|
2016-03-14 16:29:26 +01:00
|
|
|
}
|
2016-03-15 06:09:10 +01:00
|
|
|
return sto(a, b);
|
2016-03-14 16:29:26 +01:00
|
|
|
};
|
2016-03-13 14:38:44 +01:00
|
|
|
})();
|
2016-03-16 00:38:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
amazon-adsystem.com/aax2/amzn_ads.js application/javascript
|
|
|
|
(function() {
|
|
|
|
if ( amznads ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var w = window;
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var amznads = {
|
|
|
|
appendScriptTag: noopfn,
|
|
|
|
appendTargetingToAdServerUrl: noopfn,
|
|
|
|
appendTargetingToQueryString: noopfn,
|
|
|
|
clearTargetingFromGPTAsync: noopfn,
|
|
|
|
doAllTasks: noopfn,
|
|
|
|
doGetAdsAsync: noopfn,
|
|
|
|
doTask: noopfn,
|
|
|
|
detectIframeAndGetURL: noopfn,
|
|
|
|
getAds: noopfn,
|
|
|
|
getAdsAsync: noopfn,
|
|
|
|
getAdForSlot: noopfn,
|
|
|
|
getAdsCallback: noopfn,
|
|
|
|
getDisplayAds: noopfn,
|
|
|
|
getDisplayAdsAsync: noopfn,
|
|
|
|
getDisplayAdsCallback: noopfn,
|
|
|
|
getKeys: noopfn,
|
|
|
|
getReferrerURL: noopfn,
|
|
|
|
getScriptSource: noopfn,
|
|
|
|
getTargeting: noopfn,
|
|
|
|
getTokens: noopfn,
|
|
|
|
getValidMilliseconds: noopfn,
|
|
|
|
getVideoAds: noopfn,
|
|
|
|
getVideoAdsAsync: noopfn,
|
|
|
|
getVideoAdsCallback: noopfn,
|
|
|
|
handleCallBack: noopfn,
|
|
|
|
hasAds: noopfn,
|
|
|
|
renderAd: noopfn,
|
|
|
|
saveAds: noopfn,
|
|
|
|
setTargeting: noopfn,
|
|
|
|
setTargetingForGPTAsync: noopfn,
|
|
|
|
setTargetingForGPTSync: noopfn,
|
|
|
|
tryGetAdsAsync: noopfn,
|
|
|
|
updateAds: noopfn
|
|
|
|
};
|
|
|
|
w.amznads = amznads;
|
|
|
|
w.amzn_ads = w.amzn_ads || noopfn;
|
|
|
|
w.aax_write = w.aax_write || noopfn;
|
|
|
|
w.aax_render_ad = w.aax_render_ad || noopfn;
|
|
|
|
})();
|
2016-03-21 14:52:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
# https://adblockplus.org/forum/viewtopic.php?f=2&t=25216#p149739
|
|
|
|
sas-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
var noopfn = function() {
|
|
|
|
;
|
|
|
|
};
|
|
|
|
var ads = {
|
|
|
|
display: noopfn,
|
|
|
|
refresh: noopfn
|
|
|
|
};
|
|
|
|
Object.defineProperty(window, 'Ads', {
|
|
|
|
get: function() {
|
|
|
|
return ads;
|
|
|
|
},
|
|
|
|
set: noopfn
|
|
|
|
});
|
|
|
|
})();
|
2016-03-21 15:33:40 +01:00
|
|
|
|
|
|
|
# https://adblockplus.org/forum/viewtopic.php?f=2&t=25216#p149739
|
|
|
|
figaro-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
Object.defineProperty(window, 'adisplaynormal', {
|
|
|
|
get: function() {
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
set: function() {}
|
|
|
|
});
|
|
|
|
})();
|
2016-03-21 19:27:32 +01:00
|
|
|
|
|
|
|
# https://adblockplus.org/forum/viewtopic.php?f=2&t=25216#p149739
|
|
|
|
lemonde-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
localStorage.setItem('lmd_me_displayed',JSON.stringify({data:true,timeout:Date.now()+31536000000}));
|
|
|
|
})();
|
2016-03-23 19:28:29 +01:00
|
|
|
|
|
|
|
# Good case for https://github.com/gorhill/uBlock/issues/781
|
|
|
|
rtlfr-defuser.js application/javascript
|
|
|
|
(function() {
|
|
|
|
window.addEventListener('load', function() {
|
|
|
|
document.body.style.setProperty('overflow', 'auto');
|
|
|
|
});
|
|
|
|
})();
|
2016-03-26 13:56:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Experimental: Generic overlay defuser.
|
|
|
|
# if this works well and proves to be useful, this may end up as a stock tool
|
|
|
|
# in uBO's popup panel.
|
|
|
|
overlay-buster.js application/javascript
|
|
|
|
(function() {
|
|
|
|
if ( window !== window.top ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var shutdown = function() {
|
|
|
|
observer.disconnect();
|
|
|
|
observer = null;
|
|
|
|
};
|
|
|
|
var ttlTimer = setTimeout(shutdown, 15000);
|
|
|
|
var timer = null;
|
|
|
|
var domChanged = function(mutations) {
|
|
|
|
timer = null;
|
|
|
|
var docEl = document.documentElement,
|
|
|
|
bodyEl = document.body,
|
|
|
|
vw = Math.min(docEl.clientWidth, window.innerWidth),
|
|
|
|
vh = Math.min(docEl.clientHeight, window.innerHeight),
|
|
|
|
el = document.elementFromPoint(vw/2, vh/2),
|
|
|
|
style, rect;
|
|
|
|
for (;;) {
|
|
|
|
if ( el === null || el.parentNode === null || el === bodyEl ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
style = window.getComputedStyle(el);
|
2016-03-26 14:23:08 +01:00
|
|
|
if ( parseInt(style.zIndex, 10) >= 1000 && style.position === 'fixed' ) {
|
2016-03-26 13:56:19 +01:00
|
|
|
rect = el.getBoundingClientRect();
|
|
|
|
if ( rect.left <= 0 && rect.top <= 0 && rect.right >= vw && rect.bottom >= vh ) {
|
2016-03-26 14:23:08 +01:00
|
|
|
break;
|
2016-03-26 13:56:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
el = el.parentNode;
|
|
|
|
}
|
2016-03-26 14:23:08 +01:00
|
|
|
el.parentNode.removeChild(el);
|
|
|
|
if ( ttlTimer !== null ) {
|
|
|
|
clearTimeout(ttlTimer);
|
|
|
|
ttlTimer = setTimeout(shutdown, 15000);
|
|
|
|
}
|
2016-03-26 13:56:19 +01:00
|
|
|
};
|
|
|
|
var domChangedAsync = function(mutations) {
|
|
|
|
if ( timer === null ) {
|
|
|
|
timer = setTimeout(domChanged, 50);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
var observer = new MutationObserver(domChangedAsync);
|
|
|
|
var domReady = function(ev) {
|
|
|
|
document.removeEventListener(ev.type, domReady);
|
|
|
|
observer.observe(document.body, {
|
|
|
|
childList: true,
|
|
|
|
subtree: true
|
|
|
|
});
|
|
|
|
};
|
|
|
|
document.addEventListener('DOMContentLoaded', domReady);
|
|
|
|
})();
|