# 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
iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAC0lEQVQI12NgQAcAABIAAe+JVKQAAAAA
SUVORK5CYII=


3x2-transparent.png image/png;base64
iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAC0lEQVQI12NgwAUAABoAASRETuUAAAAA
SUVORK5CYII=


32x32-transparent.png image/png;base64
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGklEQVRYw+3BAQEAAACCIP+vbkhAAQAA
AO8GECAAAZf3V9cAAAAASUVORK5CYII=


noopcss text/css


noopjs application/javascript
(function() {
	;
})();


noopframe text/html
<!DOCTYPE html>
<html>
	<head><title></title></head>
	<body></body>
</html>


hd-main.js application/javascript
(function(){
	var l = {};
	var noopfn = function() {
		;
	};
	var props = [
		"$j","Ad","Bd","Cd","Dd","Ed","Fd","Gd","Hd","Id","Jd","Nj","Oc","Pc","Pe",
		"Qc","Qe","Rc","Re","Ri","Sc","Tc","Uc","Vc","Wc","Wg","Xc","Xg","Yc","Yd",
		"ad","ae","bd","bf","cd","dd","ed","ef","ek","fd","fg","fh","fk","gd","hd",
		"ig","ij","jd","kd","ke","ld","md","mi","nd","od","oh","pd","pf","qd","rd",
		"sd","td","ud","vd","wd","wg","xd","xh","yd","zd",
		"$d","$e","$k","Ae","Af","Aj","Be","Ce","De","Ee","Ek","Eo","Ep","Fe","Fo",
		"Ge","Gh","Hk","Ie","Ip","Je","Ke","Kk","Kq","Le","Lh","Lk","Me","Mm","Ne",
		"Oe","Pe","Qe","Re","Rp","Se","Te","Ue","Ve","Vp","We","Xd","Xe","Yd","Ye",
		"Zd","Ze","Zf","Zk","ae","af","al","be","bf","bg","ce","cp","df","di","ee",
		"ef","fe","ff","gf","gm","he","hf","ie","je","jf","ke","kf","kl","le","lf",
		"lk","mf","mg","mn","nf","oe","of","pe","pf","pg","qe","qf","re","rf","se",
		"sf","te","tf","ti","ue","uf","ve","vf","we","wf","wg","wi","xe","ye","yf",
		"yk","yl","ze","zf","zk"
	];
	for (var i = 0; i < props.length; i++) {
		l[props[i]] = noopfn;
	}
	window.L = window.J = l;
})();


uAssets-17 application/javascript
(function() {
	var sto = window.setTimeout;
	var mysto = function(a, b) {
		if ( b === 15000 && a.toString().indexOf('a()') !== -1 ) {
			return;
		}
		return sto(a, b);
	};
	Object.defineProperty(window, 'setTimeout', {
		get: function() {
			return mysto;
		}
	});
})();


# fuckadblock defuser
fuckadblock.js-3.2.0 application/javascript
(function() {
	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;
	var fab = new Fab(),
		getSetFab = {
			get: function() { return Fab; },
			set: function() {}
		},
		getsetfab = {
			get: function() { return fab; },
			set: function() {}
		};
	if ( window.hasOwnProperty('FuckAdBlock') ) { window.FuckAdBlock = Fab; }
	else { Object.defineProperty(window, 'FuckAdBlock', getSetFab); }
	if ( window.hasOwnProperty('BlockAdBlock') ) { window.BlockAdBlock = Fab; }
	else { Object.defineProperty(window, 'BlockAdBlock', getSetFab); }
	if ( window.hasOwnProperty('SniffAdBlock') ) { window.SniffAdBlock = Fab; }
	else { Object.defineProperty(window, 'SniffAdBlock', getSetFab); }
	if ( window.hasOwnProperty('fuckAdBlock') ) { window.fuckAdBlock = fab; }
	else { Object.defineProperty(window, 'fuckAdBlock', getsetfab); }
	if ( window.hasOwnProperty('blockAdBlock') ) { window.blockAdBlock = fab; }
	else { Object.defineProperty(window, 'blockAdBlock', getsetfab); }
	if ( window.hasOwnProperty('sniffAdBlock') ) { window.sniffAdBlock = fab; }
	else { Object.defineProperty(window, 'sniffAdBlock', getsetfab); }
})();


antiAdBlock.js application/javascript
(function() {
	window.antiAdBlock = {
		onDetected: function() {
			;
		},
		onNotDetected: function(a) {
			a();
		}
	};
})();


# 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
# Reference API:
# - https://developers.google.com/analytics/devguides/collection/gajs/
google-analytics.com/ga.js application/javascript
(function() {
	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() {
		var out = {};
		var api = [
			'_addIgnoredOrganic _addIgnoredRef _addItem _addOrganic',
			'_addTrans _clearIgnoredOrganic _clearIgnoredRef _clearOrganic',
			'_cookiePathCopy _deleteCustomVar _getName _setAccount',
			'_getAccount _getClientInfo _getDetectFlash _getDetectTitle',
			'_getLinkerUrl _getLocalGifPath _getServiceMode _getVersion',
			'_getVisitorCustomVar _initData _link _linkByPost',
			'_setAllowAnchor _setAllowHash _setAllowLinker _setCampContentKey',
			'_setCampMediumKey _setCampNameKey _setCampNOKey _setCampSourceKey',
			'_setCampTermKey _setCampaignCookieTimeout _setCampaignTrack _setClientInfo',
			'_setCookiePath _setCookiePersistence _setCookieTimeout _setCustomVar',
			'_setDetectFlash _setDetectTitle _setDomainName _setLocalGifPath',
			'_setLocalRemoteServerMode _setLocalServerMode _setReferrerOverride _setRemoteServerMode',
			'_setSampleRate _setSessionTimeout _setSiteSpeedSampleRate _setSessionCookieTimeout',
			'_setVar _setVisitorCookieTimeout _trackEvent _trackPageLoadTime',
			'_trackPageview _trackSocial _trackTiming _trackTrans',
			'_visitCode'
		].join(' ').split(/\s+/);
		var i = api.length;
		while ( i-- ) {
			out[api[i]] = noopfn;
		}
		out._getLinkerUrl = function(a) {
			return a;
		};
		return out;
	})();
	//
	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;
})();

google-analytics.com/analytics.js application/javascript
(function() {
	// 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;
})();

google-analytics.com/inpage_linkid.js application/javascript
(function() {
	window._gaq = window._gaq || {
		push: function() {
			;
		}
	};
})();

# 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() {
	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());
	}
})();

# Obviously more work needs to be done, but at least for now it takes care of:
# See related filter in assets/ublock/privacy.txt
googletagmanager.com/gtm.js application/javascript
(function() {
	var noopfn = function() {
		;
	};
	window.ga = window.ga || noopfn;
})();


# https://forums.lanik.us/viewtopic.php?f=91&t=27188
# https://forums.lanik.us/viewtopic.php?f=91&t=29609
ligatus.com/*/angular-tag.js application/javascript
(function() {
	self.adProtect = true;
	Object.defineProperties(window, {
		uabpdl: { value: true },
		uabDetect: { value: true }
	});
})();


# Yavli ads. These are blocked using an inline script tag filter, but this
# works only on Firefox. So we side-load the following script for sites
# suffering Yavli's click-bait ads.
yavli-defuser.js application/javascript
(function() {
	var noopfn = function() {
		;
	};
	var nourl = {
		set: noopfn,
		get: function() {
			return '';
		}
	};
	try {
		Object.defineProperty(window, '__durl', nourl);
		Object.defineProperty(window, '__lsurl', nourl);
		Object.defineProperty(window, '__lturl', nourl);
	} catch (ex) {
	}
	var aa = 'hx xh xb xj xs xw xf dx oq oj oz wy wj nr nw cw cv gy mr mz tq gb kx kr kt kv hc jz jb jd jx jj'.split(/\s+/);
	var no = {
		set: noopfn,
		get: function() {
			return {
				start: noopfn
			};
		}
	};
	while ( aa.length ) {
		try {
			Object.defineProperty(window, aa.pop(), no);
		} catch (e) {
		}
	}
})();


# Addefend defuser
uabinject-defuser.js application/javascript
(function() {
	window.uabpdl = window.uabInject = window.uabDetect = true;
})();


# https://github.com/gorhill/uBlock/issues/1094
pornhub-popup-defuser.js application/javascript
(function() {
	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);
	}
})();


# https://archive.rebeccablacktech.com/g/thread/S54040346#p54046766
pornhub-sanitizer.js application/javascript
(function() {
	var removeAdFrames = function(aa) {
		var el;
		for ( var i = 0; i < aa.length; i++ ) {
			el = document.getElementById(aa[i]);
			if ( el !== null ) {
				el.parentNode.removeChild(el);
			}
		}
	};
	Object.defineProperty(window, 'block_logic', {
		get: function() { return removeAdFrames; },
		set: function() {}
	});
})();


goyavelab-defuser.js application/javascript
(function() {
	var noopfn = function() {
		;
	};
	Object.defineProperty(window, '_$14', {
		get: function() { return noopfn; },
		set: noopfn
	});
})();


# https://news.ycombinator.com/item?id=10814913
forbes-defuser.js application/javascript
(function() {
	if ( window.location.pathname.lastIndexOf('/forbes/welcome/', 0) !== 0 ) {
		return;
	}
	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() {}
						});
					}
				}
			});
		}
	});
})();


# https://github.com/gorhill/uBlock/issues/733
wpredirect-defuser.js application/javascript
(function() {
	var twp = window.TWP = window.TWP || {};
	twp.Identity = twp.Identity || {};
	twp.Identity.initComplete = true;
})();


# https://github.com/gorhill/uBlock/issues/1194
# https://github.com/uBlockOrigin/uAssets/issues/106
openload.co.js application/javascript
(function() {
	Object.defineProperties(window, {
		adblock2: { value: false },
		OlPopup: { value: null },
		preserve: {
			get: function() { return true; },
			set: function() {}
		},
		turnoff: { value: true }
	});
})();


# https://github.com/gorhill/uBlock/issues/1136
1136.js application/javascript
(function() {
	var wjdmp;
	var noopfn = function() {
		;
	};
	var wjdmpGet = function() {
		return wjdmp;
	};
	var wjdmpSet = function(a) {
		wjdmp = function(r, o) {
			var kk = Object.keys(o).sort(function(a, b) {
				return parseInt(a) - parseInt(b);
			});
			var fn = o[kk[1]];
			if ( typeof fn === 'function' && /adBreaks\.push/.test(fn.toString()) ) {
				return;
			}
			a(r, o);
		};
	};
	try {
		Object.defineProperty(window, 'webpackJsonpdmp', {
			get: wjdmpGet,
			set: wjdmpSet
		});
	} catch(ex) {
	}
})();


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) ) {
			return sto(a, b);
		}
	}.bind(window);
	var signatures = [
		['blockadblock'],
		['babasbm'],
		[/getItem\('babn'\)/],
		['getElementById','String.fromCharCode','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789','charAt','DOMContentLoaded','addEventListener','doScroll','fromCharCode','sessionStorage','localStorage','Math.random']
	];
	var check = function(s) {
		var tokens, match, j, token;
		for ( var i = 0; i < signatures.length; i++ ) {
			tokens = signatures[i];
			match = true;
			for ( j = 0, pos = 0; j < tokens.length && match; j++ ) {
				token = tokens[j]
				pos = token instanceof RegExp ? s.search(token) : s.indexOf(token, pos);
				if ( pos === -1 ) { match = false; }
			}
			if ( match ) { return true; }
		}
		return false;
	};
	var realEval = window.eval;
	window.eval = function(a) {
		if ( !check(a) ) {
			return realEval(a);
		}
		var el = document.body;
		if ( el ) {
			el.style.removeProperty('visibility');
		}
		el = document.getElementById('babasbmsgx');
		if ( el ) {
			el.parentNode.removeChild(el);
		}
	}.bind(window);
})();


kissanime-defuser.js application/javascript
(function() {
	Object.defineProperty(window, 'isBlockAds2', {
		get: function() { return false; },
		set: function(a) {}
	});
})();


# 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) {}
	});
})();


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();
})();


scorecardresearch.com/beacon.js application/javascript
(function() {
	window.COMSCORE = {
		purge: function() {
			_comscore = [];
		},
		beacon: function() {
			;
		}
	};
})();


# https://github.com/gorhill/uBlock/issues/1250#issuecomment-173533894
widgets.outbrain.com/outbrain.js application/javascript
(function() {
	var noopfn = function() {
		;
	};
	var obr = {};
	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'
	];
	obr.extern = {
		video: {
			getVideoRecs: noopfn,
			videoClicked: noopfn
		}
	};
	methods.forEach(function(a) {
		obr.extern[a] = noopfn;
	});
	window.OBR = window.OBR || obr;
})();


# https://github.com/gorhill/uBlock/issues/1228
window.name-defuser application/javascript
if ( window === window.top ) {
	window.name = null;
}


# https://github.com/gorhill/uBlock/issues/897#issuecomment-180871042
doubleclick.net/instream/ad_status.js application/javascript
window.google_ad_status = 1;


# https://github.com/gorhill/uBlock/issues/1384
addthis.com/addthis_widget.js application/javascript
(function() {
	var noopfn = function() {
		;
	};
	window.addthis = {
		addEventListener: noopfn,
		button: noopfn,
		init: noopfn,
		layers: noopfn,
		ready: noopfn,
		toolbox: noopfn,
		update: noopfn
	};
})();


# 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()) ) {
			return sto(a, b);
		}
	};
})();


# 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) {
				;
			};
		}
	});
})();


# 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;
	};
})();


# 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() {
	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);
})();

# Most use this one though:
disqus.com/embed.js application/javascript
(function() {
	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);
})();


# https://github.com/gorhill/uBlock/issues/1461
ytad-defuser.js application/javascript
(function() {
	var bind = Function.prototype.bind;
	Function.prototype.bind = function() {
		'native code';
		var bound = bind.apply(this, arguments);
		bound.xpizqvtnrfkcjixkmdnu = this.toString();
		return bound;
	};
	var sto = window.setTimeout;
	window.setTimeout = function(a, b) {
		if ( b === 15000 && b < 20000 && 'xpizqvtnrfkcjixkmdnu' in a ) {
			console.log('uBO>', a.xpizqvtnrfkcjixkmdnu);
		}
		return sto(a, b);
	};
})();


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;
})();


# 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
	});
})();

# 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() {}
	});
})();

# 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}));
})();

# 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');
	});
})();


# Experimental: Generic nuisance overlay buster.
# 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 tstart;
	var ttl = 30000;
	var delay = 0;
	var delayStep = 50;
	var buster = function(mutations) {
		var docEl = document.documentElement,
			bodyEl = document.body,
			vw = Math.min(docEl.clientWidth, window.innerWidth),
			vh = Math.min(docEl.clientHeight, window.innerHeight),
			tol = Math.min(vw, vh) * 0.05,
			el = document.elementFromPoint(vw/2, vh/2),
			style, rect;
		for (;;) {
			if ( el === null || el.parentNode === null || el === bodyEl ) {
				break;
			}
			style = window.getComputedStyle(el);
			if ( parseInt(style.zIndex, 10) >= 1000 || style.position === 'fixed' ) {
				rect = el.getBoundingClientRect();
				if ( rect.left <= tol && rect.top <= tol && (vw - rect.right) <= tol && (vh - rect.bottom) < tol ) {
					el.parentNode.removeChild(el);
					tstart = Date.now();
					el = document.elementFromPoint(vw/2, vh/2);
					bodyEl.style.setProperty('overflow', 'auto', 'important');
					docEl.style.setProperty('overflow', 'auto', 'important');
					continue;
				}
			}
			el = el.parentNode;
		}
		if ( (Date.now() - tstart) < ttl ) {
			delay = Math.min(delay + delayStep, 1000);
			setTimeout(buster, delay);
		}
	};
	var domReady = function(ev) {
		if ( ev ) {
			document.removeEventListener(ev.type, domReady);
		}
		tstart = Date.now();
		setTimeout(buster, delay);
	};
	if ( document.readyState === 'loading' ) {
		document.addEventListener('DOMContentLoaded', domReady);
	} else {
		domReady();
	}
})();


# http://www.wilderssecurity.com/threads/ublock-a-lean-and-fast-blocker.365273/page-77
imore-sanitizer.js application/javascript
(function() {
	if ( window.mbn_zones ) {
		delete window.mbn_zones;
		return;
	}
	Object.defineProperty(window, 'mbn_zones', {
		value: undefined
	});
})();


# https://forums.lanik.us/viewtopic.php?f=62&t=25212
# https://github.com/uBlockOrigin/uAssets/issues/3
impspcabe-defuser.js application/javascript
(function(){
	window._impspcabe = false;
	window._impspcabe_alpha = false;
	window._impspcabe_beta = false;
	window._impspcabe_path = 'about:blank';
})();


# https://github.com/uBlockOrigin/uAssets/issues/8
alert-buster.js application/javascript
(function() {
	window.alert = function(a) {
		console.info(a);
	};
})();


# https://github.com/uBlockOrigin/uAssets/issues/36
nr-unwrapper.js application/javascript
(function(){
	var wrapped = ' \
		EventTarget.prototype.addEventListener \
		EventTarget.prototype.removeEventListener \
		XMLHttpRequest.prototype.open \
		XMLHttpRequest.prototype.send \
		addEventListener \
		clearTimeout \
		removeEventListener \
		requestAnimationFrame \
		setInterval \
		setTimeout \
		'.split(/\s+/);
	var path, o, p, fn;
	for ( var i = 0; i < wrapped.length; i++ ) {
		path = wrapped[i].split('.');
		p = '';
		for ( var j = 0; j < path.length; j++ ) {
			if ( path[j] === '' ) {
				continue;
			}
			o = p !== '' ? o = o[p] : window;
			p = path[j];
		}
		if ( p === '' ) {
			continue;
		}
		fn = o[p];
		if (
			typeof fn === 'function' &&
			fn.toString().indexOf('nrWrapper') !== -1 &&
			typeof fn['nr@original'] === 'function'
		) {
			o[p] = fn['nr@original'];
		}
	}
})();


# https://github.com/uBlockOrigin/uAssets/issues/38
r3z-defuser.js application/javascript
(function() {
	var r3z = window._r3z = window._r3z || {};
	Object.defineProperty(r3z, 'pub', {
		value: {}
	});
})();


# https://github.com/uBlockOrigin/uAssets/issues/58
gpt-defuser.js application/javascript
(function() {
	var noopfn = function() {
		;
	};
	var props = [ 'resetGPT', 'resetAndLoadGPTRecovery', 'setupGPT', 'setupGPTuo' ];
	while ( props.length ) {
		var prop = props.pop();
		if ( typeof window[prop] === 'function' ) {
			window[prop] = noopfn; 
		} else {
			Object.defineProperty(window, prop, {
				get: function() { return noopfn; },
				set: noopfn
			});
		}
	}
})();


# https://github.com/uBlockOrigin/uAssets/issues/66
folha-de-sp.js application/javascript
(function() {
	if ( window.folha_ads !== undefined ) {
		window.folha_ads = true;
		return
	}
	Object.defineProperty(window, 'folha_ads', {
		get: function() {
			return true;
		},
		set: function() {
			;
		}
	});
})();


# Prevent web pages from using eval(), and report attempts in console.
noeval.js application/javascript
(function() {
	window.eval = function(s) {
		console.log('Document tried to eval... \n' + s);
	}.bind(window);
})();


# Prevent web pages from using RTCPeerConnection(), and report attempts in console.
nowebrtc.js application/javascript
(function() {
	var pc = function(cfg) {
		console.log('Document tried to create an RTCPeerConnection: %o', cfg);
	};
	var noop = function() {
		;
	};
	pc.prototype = {
		close: noop,
		createDataChannel: noop,
		createOffer: noop,
		setRemoteDescription: noop
	};
	window.RTCPeerConnection = pc.bind(window);
})();


# https://adblockplus.org/forum/viewtopic.php?f=10&t=46010
indiatoday.intoday.in.js application/javascript
(function() {
	Object.defineProperties(window, {
		adBlock: { value: false },
		checkAds: { value: function() {} }
	});
})();


# Prevent web pages from using eval(), and report attempts in console.
videowood.tv.js application/javascript
(function() {
	var realEval = window.eval;
	window.eval = function(s) {
		var r = realEval(s);
		if ( window.config && window.config.adb_remind ) {
			window.config.adb_remind = false;
		}
		return r;
	}.bind(window);
})();


# https://github.com/gorhill/uBlock/issues/1340#issuecomment-230495317
__$dc-defuser.js application/javascript
(function() {
	if ( Math.mt_random === undefined ) {
		Object.defineProperty(Math, 'mt_random', {
			value: function() { throw new TypeError(); }.bind()
		});
	} else {
		Math.mt_random = function() { throw new TypeError(); }.bind();
	}
})();


# https://forums.lanik.us/viewtopic.php?f=62&t=31285
indiatimes.com.js application/javascript
(function() {
	var dael = document.addEventListener.bind(document),
		evts = ['error', 'mousemove', 'scroll'];
	document.addEventListener = function(a, b, c) {
		if ( evts.indexOf(a) !== -1 ) {
			var s = b.toString();
			if ( /^\s*function\s+(\(?_0x[0-9a-z]+\)?|detected)(?:.|\n)*?\1/.test(s) ) {
				return;
			}
		}
		return dael(a, b, c);
	}.bind();
})();


# https://forums.lanik.us/viewtopic.php?f=23&t=31545
adf.ly.js application/javascript
(function() {
	var realEval = window.eval;
	var noopfn = function(){
		;
	}.bind();
	window.eval = function(s) {
		var r = realEval(s);
		if ( typeof window.abgo === 'function' ) {
			window.abgo = noopfn;
		}
		return r;
	}.bind(window);
})();


# https://m.reddit.com/r/firefox/comments/4ucrvy/can_ublock_origin_disable_javascript_for_a/
hindustantimes.com.js application/javascript
window.canRun = true;


# https://m.reddit.com/r/firefox/comments/4ucrvy/can_ublock_origin_disable_javascript_for_a/
bhaskar.com.js application/javascript
window.canABP = true;


# https://adblockplus.org/forum/viewtopic.php?f=1&t=47754
thesimsresource.com.js application/javascript
Object.defineProperties(window, {
	gadsize: { value: 1 },
	iHaveLoadedAds: { value: true },
	OX: { value: true }
});


# https://github.com/uBlockOrigin/uAssets/issues/88
golem.de.js application/javascript
(function() {
	var rael = window.addEventListener;
	window.addEventListener = function(a, b, c) {
		rael(a, b, c);
		if ( /^\s*function\s*\(\)\s*{\s*window\.clearTimeout\(r\)\s*\}\s*$/.test(b.toString()) ) {
			b();
		}
	}.bind(window);
})();


# https://www.reddit.com/r/firefox/comments/4wpd23/popads_just_announced_that_they_have_a_new_method/
popads.net.js application/javascript
(function() {
	window.PopAds = function() {
		;
	};
})();


# https://adblockplus.org/forum/viewtopic.php?f=1&t=45634#p157317
allmusic.com.js application/javascript
(function() {
	var z = {
		value: function() {
			;
		}
	};
	Object.defineProperties(window, {
		'__cli': z,
		'cmnUNT':  z
	});
	window.tile_num = 0;
})();


# https://forums.lanik.us/viewtopic.php?f=62&t=32070
xvideos.com.js application/javascript
(function() {
	var z = function(ads) {
		var banners = ads && ads.banners;
		if ( !banners ) { return; }
		var banner, div;
		while ( banners.length !== 0 ) {
			banner = banners[0];
			if ( !banner ) { continue; }
			while ( (div = document.getElementById(banner.div_id)) !== null ) {
				div.parentNode.removeChild(div);
			}
			banners.shift();
		}
	};
	window.addEventListener('DOMContentLoaded', function() {
		var xv = window.xv;
		z(xv && xv.conf && xv.conf.ads);
	});
	var dfn,
		dfntrap = function(a, b, c) {
			if ( a !== 'config/ads' ) { dfn(a, b, c); return; }
			var ads = b;
			while ( typeof ads === 'function' ) { ads = ads(); }
			z(ads);
			b = function() { return function() { return JSON.parse(JSON.stringify(ads)); }; };
			dfn(a, ads, c);
		};
	Object.defineProperty(window, 'define', {
		get: function() { return dfn ? dfntrap : undefined; },
		set: function(a) { dfn = a; }
	});
})();


# https://forums.lanik.us/viewtopic.php?f=62&t=31322&start=30
ndtv.com.js application/javascript
Object.defineProperty(window, '___p_p', { value: 1 });


# https://forums.lanik.us/viewtopic.php?f=64&t=32278
jpost.com.js application/javascript
Object.defineProperty(window, 'upManager', { value: function() {} });


# https://github.com/uBlockOrigin/uAssets/issues/108
wetteronline.de.js application/javascript
(function() {
	var nopefn = function() { throw new TypeError('Nope'); };
	Object.defineProperty(window, 'xq5UgyIZx', {
		get: nopefn,
		set: nopefn
	});
	window.WO = {};
	Object.defineProperty(window.WO, 'doAbCheck', {
		value: function() {}
	});
})();


# https://github.com/uBlockOrigin/uAssets/issues/108
trafictube.ro.js application/javascript
(function() {
	var z = window.setInterval.bind(window),
		re = /\(new\s+\w\)\.start\(\)/;
	window.setInterval = function(a, b) {
		if ( re.test(a.toString()) ) {
			return 0;
		}
		return z(a, b);
	}.bind(window);
})();


# https://github.com/uBlockOrigin/uAssets/issues/110
smartadserver.com.js application/javascript
Object.defineProperties(window, {
	SmartAdObject: { value: function(){} },
	SmartAdServerAjax: { value: function(){} },
	smartAd: { value: { LoadAds: function() {}, Register: function() {} } }
});


# http://www.linuxtricks.fr/news/10-logiciels-libres/169-contourner-les-anti-bloqueurs-de-pub-la-revanche/
lesechos.fr.js application/javascript
Object.defineProperty(window, 'checkAdBlock', {
	value: function(){}
});


# https://forums.lanik.us/viewtopic.php?f=62&t=32636
# https://forums.lanik.us/viewtopic.php?f=62&t=32703
i10c-defuser.js application/javascript
(function() {
	var noopfn = function() {
		return false;
	};
	var v = { CanRun: noopfn };
	if ( window.I10C !== undefined ) {
		window.I10C = v;
	} else {
		Object.defineProperty(window, 'I10C', { value: v });
	}
	v = { Init: noopfn };
	if ( window.INSTART !== undefined ) {
		window.INSTART = v;
	} else {
		Object.defineProperty(window, 'INSTART', { value: v });
	}
})();


# https://github.com/uBlockOrigin/uAssets/issues/141
criteo.net.js application/javascript
(function() {
	var noopfn = function() {};
	var criteo = {
		DisplayAd: noopfn
	};
	if ( window.hasOwnProperty('Criteo') ) {
		window.Criteo = criteo;
	} else {
		Object.defineProperty(window, 'Criteo', { value: criteo });
	}
})();
