I'm looking to create an extension for the leading browsers (firefox, safari and ie). Its rather simple, and I'm looking for the most efficient way to go about this.
I need to get the hostname of the current site the user is on, and if it matches a certain parameter(eg, mysite.org), I'll need to append to the link some extra data and refresh to the new link.
What is 开发者_JAVA技巧the simplest way to go about this? (I don't want to go in the direction of a bookmarklet - since this would require the user to click. I'd like this to happen automatically)
sort of something like this:
if(window.location.hostname == 'mysite.org')
{
location.replace(document.location.href + '/&mystuff=xyz');
}
Thanks!
http://arantius.com/misc/greasemonkey/script-compiler
精彩评论