Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var loadAdsense = function (parentId, client, slot, insclass, width, height) {
- try {
- var id = document.getElementById(parentId);
- if (!id) {
- return;
- }
- loadScript("//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", function () {
- var a = document.createElement("ins");
- a.setAttribute("class", insclass);
- a.setAttribute("style", "display:inline-block;width:" + width + "px;height:" + height + "px");
- a.setAttribute("data-ad-client", client);
- a.setAttribute("data-ad-slot", slot);
- id.appendChild(a);
- (adsbygoogle = window.adsbygoogle || []).push({});
- }, null, true);
- } catch (e) {
- console.log(e.message);
- }
- };
- loadAdsense("body", "ca-pub-5139218182323575", "6266130042", "adsbygoogle", 300, 250);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement