deploy: 9abfee98e0cf6c0e2255503a15b1a4c1b6774c91

This commit is contained in:
SukkaBot
2022-12-08 16:15:37 +00:00
parent 722e4af028
commit 2e4123dcdc
9 changed files with 217 additions and 8 deletions

View File

@@ -0,0 +1,18 @@
(function () {
'use strict';
const noopfn = function () {
};
window.addthis = {
addEventListener: noopfn,
button: noopfn,
counter: noopfn,
init: noopfn,
layers: noopfn,
ready: noopfn,
sharecounters: {
getShareCounts: noopfn
},
toolbox: noopfn,
update: noopfn
};
})();

View File

@@ -0,0 +1,13 @@
(function () {
'use strict';
const head = document.head;
if (!head) { return; }
const style = document.createElement('style');
style.textContent = [
'body {',
' animation: none !important;',
' overflow: unset !important;',
'}'
].join('\n');
head.appendChild(style);
})();

View File

@@ -0,0 +1 @@
window.google_ad_status = 1;

View File

@@ -0,0 +1,7 @@
(function () {
'use strict';
window._gaq = window._gaq || {
push: function () {
}
};
})();

View File

@@ -0,0 +1,31 @@
(function () {
'use strict';
const init = () => {
window.adsbygoogle = {
loaded: true,
push: function () {
}
};
const phs = document.querySelectorAll('.adsbygoogle');
const css = 'height:1px!important;max-height:1px!important;max-width:1px!important;width:1px!important;';
for (let i = 0; i < phs.length; i++) {
const id = `aswift_${i}`;
if (document.querySelector(`iframe#${id}`) !== null) { continue; }
const fr = document.createElement('iframe');
fr.id = id;
fr.style = css;
const cfr = document.createElement('iframe');
cfr.id = `google_ads_frame${i}`;
fr.appendChild(cfr);
phs[i].appendChild(fr);
}
};
if (
document.querySelectorAll('.adsbygoogle').length === 0 &&
document.readyState === 'loading'
) {
window.addEventListener('DOMContentLoaded', init, { once: true });
} else {
init();
}
})();

View File

@@ -0,0 +1,132 @@
(function () {
'use strict';
// https://developers.google.com/doubleclick-gpt/reference
const noopfn = function () {
}.bind();
const noopthisfn = function () {
return this;
};
const noopnullfn = function () {
return null;
};
const nooparrayfn = function () {
return [];
};
const noopstrfn = function () {
return '';
};
//
const companionAdsService = {
addEventListener: noopthisfn,
enableSyncLoading: noopfn,
setRefreshUnfilledSlots: noopfn
};
const contentService = {
addEventListener: noopthisfn,
setContent: noopfn
};
const PassbackSlot = function () {
};
let p = PassbackSlot.prototype;
p.display = noopfn;
p.get = noopnullfn;
p.set = noopthisfn;
p.setClickUrl = noopthisfn;
p.setTagForChildDirectedTreatment = noopthisfn;
p.setTargeting = noopthisfn;
p.updateTargetingFromMap = noopthisfn;
const 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,
getTargeting: noopfn,
getTargetingKeys: nooparrayfn,
getSlots: nooparrayfn,
refresh: noopfn,
removeEventListener: noopfn,
set: noopthisfn,
setCategoryExclusion: noopthisfn,
setCentering: noopfn,
setCookieOptions: noopthisfn,
setForceSafeFrame: noopthisfn,
setLocation: noopthisfn,
setPublisherProvidedId: noopthisfn,
setPrivacySettings: noopthisfn,
setRequestNonPersonalizedAds: noopthisfn,
setSafeFrameConfig: noopthisfn,
setTagForChildDirectedTreatment: noopthisfn,
setTargeting: noopthisfn,
setVideoContent: noopthisfn,
updateCorrelator: noopfn
};
const SizeMappingBuilder = function () {
};
p = SizeMappingBuilder.prototype;
p.addSize = noopthisfn;
p.build = noopnullfn;
const 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.getResponseInformation = noopnullfn;
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;
p.updateTargetingFromMap = noopthisfn;
//
const gpt = window.googletag || {};
const 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.destroySlots = noopfn;
gpt.disablePublisherConsole = noopfn;
gpt.display = noopfn;
gpt.enableServices = noopfn;
gpt.getVersion = noopstrfn;
gpt.pubads = function () { return pubAdsService; };
gpt.pubadsReady = true;
gpt.setAdIframeTitle = noopfn;
gpt.sizeMapping = function () { return new SizeMappingBuilder(); };
window.googletag = gpt;
while (cmd.length !== 0) {
gpt.cmd.push(cmd.shift());
}
})();