(I posted this to the cocoadev mailing list, but thought id post it here also)
Hi,
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:
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
Hi,
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