Skip to content

Instantly share code, notes, and snippets.

View ilyasozkurt's full-sized avatar
💭
I may be slow to respond.

İlyas Özkurt ilyasozkurt

💭
I may be slow to respond.
View GitHub Profile
@sureshHARDIYA
sureshHARDIYA / adsense.js
Last active January 15, 2024 06:25
Create Google Adsense ad using JavaScript
var adUnit = document.getElementsByClassName("section-below-title")[0];
var parentElement = adUnit.childNodes[0];
// Create script element
var script = document.createElement('script');
script.async = true;
script.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
parentElement.appendChild(script);
// Create INS element