Getting the web element for the blocked ad

Various discussions related to Adblock Plus development

Getting the web element for the blocked ad

Postby Zampa » Wed Feb 05, 2020 11:56 am

Hello everyone,,
I am working on a project where I need to identify the ads in a webpage and study them. I want to use ABP for effectively identifying the ads. But I noticed that ABP simply creates the CSS and passes it on to the browser.

From the source code:
In elemHide.js, apply() function:
Utils.styleService.loadAndRegisterSheet(styleURL, Ci.nsIStyleSheetService.USER_SHEET);

So I am not able to get a handle on the web element containing the advertisement.

Is there a way I can get a handle/reference to the web element for the ad itself? Any help will be appreciated.

Thanks.
Zampa
 
Posts: 2
Joined: Wed Feb 05, 2020 11:53 am

Re: Getting the web element for the blocked ad

Postby sbell » Thu Feb 06, 2020 11:49 pm

Hi Zampa!

You can actually use developer tools to view the blocked items on a page. Find more details here https://help.eyeo.com/en/adblockplus/vi ... s?b5e9f793

Thanks
Shannon
ABP Support Team
sbell
ABP Technical Support Specialist
 
Posts: 498
Joined: Wed Jul 05, 2017 8:08 pm


Return to Adblock Plus development

Who is online

Users browsing this forum: No registered users and 1 guest