Sunday, 21 May 2023

How to remove/replace Google Ads div with a custom div

I'm building a Chrome extension for educational purposes that removes/replaces a GoogleAds div with my custom div.

How do I locate the google-ad divs? Is there a specific id or class associated with it?

This is how I'm injecting my code into the website:--

content-script.js

var div=document.createElement("div"); // is there any specific divID associated with it?
document.body.appendChild(div); 
div.innerText="test123";


from How to remove/replace Google Ads div with a custom div

No comments:

Post a Comment