I am working on an ad blocker coded in javascript. I have some code from an old project, what I do so far is to loop on all the iframes and I search if the src url match a list like: /http:\/\/[a-zA-Z0-9-_\.]*mediaplex\.com/, /http:\/\/ad\.yieldmanager\.com/, /http:\/\/ad\.zanox\.com/, Is this a good way to do it or will I [...]
I am working on an ad blocker coded in javascript. I have some code from an old project, what I do so far is to loop on all the iframes and I search if the src url match a list like:
/http:\/\/[a-zA-Z0-9-_\.]*mediaplex\.com/,
/http:\/\/ad\.yieldmanager\.com/,
/http:\/\/ad\.zanox\.com/,
Is this a good way to do it or will I miss too many ads that doesnt work this way?
Also is there something like this already made so I can check that code? I was checking a few firefox extensions like ad_blocker-0.6 and adblock_plus-1.2.2 but they are different from what I want to do, they mostly have “event listeners”, I need to work with the already displayed code and I use pure js without any lib or framework. I get the iframes using DOM.
Related posts:
Comments on this entry (no comments)
Did you like this post? You can share your opinion with us! Simply click here.