0

I have a little problem and I searched on the internet but I can't find it. Hoping for someone to help me, I'll get back to you...

I've developed a chrome extension that has the functionality to block ads. Now my question is:

--- How can I count the number of ads blocked on each site on each site and show it in my extension's badge?

Does anyone have any tips to help me do this? Thanks in advance!

Doddox
  • 1
  • This would depend heavily on your code. The general idea would be to save a counter off somewhere, and increment it each time you run your function that finds an add and blocks it. – Branson Smith Jan 24 '20 at 19:01
  • Yes I had thought of that but except that I don't have a function that specifically counts ads on the current page. To block ads, I made a long list of filters that I just load into the webRequest. But now I need to know which ones have been blocked in my list. – Doddox Jan 24 '20 at 22:36
  • That's why I'm trying to find out how to access the list of ads blocked by chrome. There must be a way to see all the domains blocked by chromium, right? – Doddox Jan 24 '20 at 22:39
  • This question is very unhelpful because how is anyone supposed to know how to help you if you can't share some of the code? You don't give any general idea how you do what you do, so how is anyone supposed to append some advice to your preexisting solution? – Altimus Prime Apr 09 '21 at 03:50

0 Answers0