Difference between revisions of "Template:Ads recomended"

From Enduro.team
Jump to: navigation, search
m
m
Line 3: Line 3:
 
<body>
 
<body>
 
<div class="adsrecomended">
 
<div class="adsrecomended">
<script type="text/javascript" src="/ads.js"></script>
+
<script>
 +
var externalScript  = document.createElement("script");
 +
externalScript.type = "text/javascript";
 +
externalScript.setAttribute('async','async');
 +
externalScript.src = "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9226951475373251";
 +
document.getElementsByTagName('body')[0].appendChild(externalScript);
 +
 
 +
var ins  = document.createElement("ins");
 +
ins.setAttribute('class','adsbygoogle');
 +
ins.setAttribute('style','display:block;');/*add other styles if required*/
 +
ins.setAttribute('data-ad-client','9226951475373251');
 +
ins.setAttribute('data-ad-slot','3159268773');
 +
ins.setAttribute('data-ad-format','autorelaxed');
 +
document.getElementsByTagName('body')[0].appendChild(ins);
 +
 
 +
var inlineScript  = document.createElement("script");
 +
inlineScript.type  = "text/javascript";
 +
inlineScript.text  = '(adsbygoogle = window.adsbygoogle || []).push({});'
 +
document.getElementsByTagName('body')[0].appendChild(inlineScript);
 +
</script>
 
</div>
 
</div>
 
</body>
 
</body>
 
</html>
 
</html>
 
</center>
 
</center>

Revision as of 13:57, 22 July 2021