Skip to content

Instantly share code, notes, and snippets.

@lavarini
Created November 8, 2018 20:27
Show Gist options
  • Save lavarini/c225e578f64ab7a7ee11fd9879e8d588 to your computer and use it in GitHub Desktop.
Save lavarini/c225e578f64ab7a7ee11fd9879e8d588 to your computer and use it in GitHub Desktop.
(function(w, d, s) {
try {
d = w.top.document || d; w = w.top.document ? w.top : w;
} catch (e) {}
var ttag = function() {
var slot;
slot = parent.document.querySelectorAll('#pub_teads');
if (slot.length == 0) {
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )
slot = parent.document.querySelectorAll('#pub_11');
else
slot = parent.document.querySelectorAll('#pub_17');
}
var min_slot = 1;
w.teads.page(81139).placement(87831, {slider: {allow_corner_position: false, allow_top_position: false}, "css":"margin: 20px auto 20px auto; max-width: 550px;","format":"inread","slot":{"insertInside":true,"btf":false,"selector":slot,"minimum":min_slot}}).passback(function passback() {var passbackDiv = window.top.document.createElement("div"),
js = window.top.document.createElement("script"),
passbackSlot = window.top.document.querySelectorAll("#pub_11,#pub_17")[0];
passbackDiv.innerHTML = '<ins class="adsbygoogle" style="display:inline-block; width:300px; height:250px;" data-ad-client="ca-pub-5289793328419085" data-ad-slot="Letras_Mobile_Cifra_Club_passback_Teads"></ins>';
passbackDiv.style = "width:300px; margin:auto;";
js.type = "text/javascript";
js.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
passbackDiv.appendChild(js);
passbackSlot.appendChild(passbackDiv);
js2 = window.top.document.createElement("script");
js2.type = "text/javascript";
js2.innerHTML = "(adsbygoogle = window.top.adsbygoogle || []).push({});";
passbackDiv.appendChild(js2);}).serve();
};
if (w.teads && w.teads.page) { ttag(); }
else if (!w.teadsscript) {
s.src = '//a.teads.tv/media/format/v3/teads-format.min.js';
s.async = true; s.onload = ttag; w.teadsscript = d.getElementsByTagName('head')[0].appendChild(s);
}
})(window, document, document.createElement('script'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment