开发者

Best method for creating a universal extention/plugin

开发者 https://www.devze.com 2022-12-17 22:11 出处:网络
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'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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号