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
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
890e6b30c6a4cfd2ac5aa1bbe36d30fe assets/ublock/experimental.txt
568e0aa037e43665402077d63ae8a54f assets/ublock/resources.txt
be0f80da01435199b5b4602d258bd9c4 assets/ublock/resources.txt
0a586f61b5bea73447c1bc1d46791c4c assets/ublock/filter-lists.json
50573388b525ede1a920cd4b4ee7fbf0 assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.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"
googletagservices.com/gpt.js application/javascript
(function() {
var p;
// https://developers.google.com/doubleclick-gpt/reference
var noopfn = function() {
;
@ -208,64 +209,120 @@ googletagservices.com/gpt.js application/javascript
var noopthisfn = function() {
return this;
};
//
var slot = {
addService: noopthisfn,
clearTargeting: noopfn,
defineSizeMapping: noopthisfn,
setCategoryExclusion: noopfn,
setCollapseEmptyDiv: noopfn,
setTargeting: noopthisfn
var noopnullfn = function() {
return null;
};
var nooparrayfn = function() {
return [];
};
var noopstrfn = function() {
return '';
};
var slotfn = function() { return slot; };
//
var pas = {
addEventListener: noopfn,
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,
definePassback: noopthisfn,
defineOutOfPagePassback: function() { return new PassbackSlot(); },
definePassback: function() { return new PassbackSlot(); },
disableInitialLoad: noopfn,
display: noopfn,
enableAsyncRendering: noopfn,
enableSingleRequest: noopfn,
enableSyncRendering: noopfn,
getSlots: function() { return []; },
enableVideoAds: noopfn,
get: noopnullfn,
getAttributeKeys: nooparrayfn,
refresh: noopfn,
set: noopfn,
setCategoryExclusion: noopfn,
setTargeting: noopthisfn
set: noopthisfn,
setCategoryExclusion: noopthisfn,
setCentering: noopfn,
setCookieOptions: noopthisfn,
setLocation: noopthisfn,
setPublisherProvidedId: noopthisfn,
setTagForChildDirectedTreatment: noopthisfn,
setTargeting: noopthisfn,
setVideoContent: noopthisfn,
updateCorrelator: noopfn
};
//
var smb = {
addSize: noopthisfn,
build: 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 || {};
gpt._vars_ = gpt._vars_ || {};
gpt.display = noopfn;
gpt.defineSlot = slotfn;
gpt.defineOutOfPageSlot = slotfn;
gpt.enableServices = noopfn;
gpt.getVersion = gpt.getVersion || noopfn;
gpt.pubads = function() { return pas; };
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();
}
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());
}
})();