Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BollywooD

macrumors 6502
Original poster
Apr 27, 2005
373
46
Hamburg
(I posted this to the cocoadev mailing list, but thought id post it here also)

Hi,:confused:

I am currently trying to implement element blocking into my opensource Safari adblocker project:
http://code.google.com/p/safariadblocker/


And I was thinking of taking the approach, of feeding a javascript function to Safari:

Code:
function hide_elements(id)
{
document.getElementById(id).style.display="none";

}

where id would be fed to the script from the adblock list(An NSArray of NSStrings). I don't know javascript, so need to figure out how to do this also)

What I was wanting to know, is how do I apply the javascript to Safari?
any help would be appreciated.

thanks in advance
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.