this probably brings neutered googletag out of experimental status

This commit is contained in:
gorhill 2016-01-02 12:00:42 -05:00
parent 2b8d9516a9
commit 0a7b524f6a
2 changed files with 100 additions and 43 deletions

View File

@ -5,7 +5,7 @@
146704ad1c0393e342afdb416762c183 assets/ublock/badware.txt 146704ad1c0393e342afdb416762c183 assets/ublock/badware.txt
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt 5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
890e6b30c6a4cfd2ac5aa1bbe36d30fe assets/ublock/experimental.txt 890e6b30c6a4cfd2ac5aa1bbe36d30fe assets/ublock/experimental.txt
568e0aa037e43665402077d63ae8a54f assets/ublock/resources.txt be0f80da01435199b5b4602d258bd9c4 assets/ublock/resources.txt
0a586f61b5bea73447c1bc1d46791c4c assets/ublock/filter-lists.json 0a586f61b5bea73447c1bc1d46791c4c assets/ublock/filter-lists.json
50573388b525ede1a920cd4b4ee7fbf0 assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt 50573388b525ede1a920cd4b4ee7fbf0 assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
61cc16cf02e034370f0f47bc17c46551 assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt 61cc16cf02e034370f0f47bc17c46551 assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt

View File

@ -201,6 +201,7 @@ www.google-analytics.com/analytics.js application/javascript
# "visitor behavior" # "visitor behavior"
googletagservices.com/gpt.js application/javascript googletagservices.com/gpt.js application/javascript
(function() { (function() {
var p;
// https://developers.google.com/doubleclick-gpt/reference // https://developers.google.com/doubleclick-gpt/reference
var noopfn = function() { var noopfn = function() {
; ;
@ -208,64 +209,120 @@ googletagservices.com/gpt.js application/javascript
var noopthisfn = function() { var noopthisfn = function() {
return this; return this;
}; };
// var noopnullfn = function() {
var slot = { return null;
addService: noopthisfn, };
clearTargeting: noopfn, var nooparrayfn = function() {
defineSizeMapping: noopthisfn, return [];
setCategoryExclusion: noopfn, };
setCollapseEmptyDiv: noopfn, var noopstrfn = function() {
setTargeting: noopthisfn return '';
}; };
var slotfn = function() { return slot; };
// //
var pas = { var companionAdsService = {
addEventListener: noopfn, 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, clear: noopfn,
clearCategoryExclusions: noopthisfn,
clearTagForChildDirectedTreatment: noopthisfn,
clearTargeting: noopthisfn,
collapseEmptyDivs: noopfn, collapseEmptyDivs: noopfn,
definePassback: noopthisfn, defineOutOfPagePassback: function() { return new PassbackSlot(); },
definePassback: function() { return new PassbackSlot(); },
disableInitialLoad: noopfn, disableInitialLoad: noopfn,
display: noopfn, display: noopfn,
enableAsyncRendering: noopfn,
enableSingleRequest: noopfn, enableSingleRequest: noopfn,
enableSyncRendering: noopfn, enableSyncRendering: noopfn,
getSlots: function() { return []; }, enableVideoAds: noopfn,
get: noopnullfn,
getAttributeKeys: nooparrayfn,
refresh: noopfn, refresh: noopfn,
set: noopfn, set: noopthisfn,
setCategoryExclusion: noopfn, setCategoryExclusion: noopthisfn,
setTargeting: noopthisfn setCentering: noopfn,
setCookieOptions: noopthisfn,
setLocation: noopthisfn,
setPublisherProvidedId: noopthisfn,
setTagForChildDirectedTreatment: noopthisfn,
setTargeting: noopthisfn,
setVideoContent: noopthisfn,
updateCorrelator: noopfn
}; };
// var SizeMappingBuilder = function() {
var smb = { ;
addSize: noopthisfn,
build: noopfn
}; };
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 gpt = window.googletag || {};
gpt._vars_ = gpt._vars_ || {}; var cmd = gpt.cmd || [];
gpt.display = noopfn; gpt.apiReady = true;
gpt.defineSlot = slotfn; gpt.cmd = [];
gpt.defineOutOfPageSlot = slotfn; gpt.cmd.push = function(a) {
gpt.enableServices = noopfn; try {
gpt.getVersion = gpt.getVersion || noopfn; a();
gpt.pubads = function() { return pas; }; } catch (ex) {
gpt.sizeMapping = function() { return smb; };
//
if ( Array.isArray(gpt.cmd) ) {
gpt.cmd.forEach(function(a) {
if ( typeof a === 'function' ) {
a();
}
});
}
gpt.cmd = {
push: function(a) {
if ( typeof a === 'function' ) {
a();
}
} }
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; window.googletag = gpt;
while ( cmd.length !== 0 ) {
gpt.cmd.push(cmd.shift());
}
})(); })();