running javascript from obj-C
running javascript from obj-C
- Subject: running javascript from obj-C
- From: Russell Gray <email@hidden>
- Date: Wed, 3 Mar 2010 11:14:01 +1100
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:
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.
regards,
Russell
SweetP Productions
www.sweetpproductions.com_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden