How to remove Ad elements from a webpage (IE DOM)

Get help with using AutoHotkey and its commands and hotkeys
DanielToward13
Posts: 71
Joined: 18 May 2017, 10:56

How to remove Ad elements from a webpage (IE DOM)

07 Dec 2017, 10:33

It's possible to open a page and remove some html tags/elements manually from the inspect element. I am looking for a way to do it automatically in DOM (Something like what AdBlock extension is doing). How to remove ads which has class name tags?
I don't wan't to retrieve the html content and display it's modified version on GUI because the user might click on links and surf the website.
DanielToward13
Posts: 71
Joined: 18 May 2017, 10:56

Re: How to remove Ad elements from a webpage (IE DOM)

07 Dec 2017, 11:09

I did it by simply manipulating the DOM document.getElementsByClassName("smaller")[0].innerHTML="". I don't know why such a simple solution didn't come to mind before. Now I have another question: is there a way to display specific classes only? This way I don't have to find undesirable classes and remove them instead I will only display my desired class.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot] and 49 guests