AutoLink user script
May 22nd, 2005AutoLink turns plain text URLs, email addresses, bug numbers, ISBNs, and US phone numbers into links. For example, it turns all of these into links:
- http://www.squarefree.com/userscripts/
- jruderman@gmail.com
- Bug 162020
- Bug 162020 comment 0
- ISBN 0-340-82899-4
- (555) 555-5555
You can add new filters if you know how to use JavaScript regular expressions. Here is an example filter, rewrapped to fit in my blog:
{
name: "Bug number",
regexp: /bug \#?(\d+)/ig,
href: function(match) {
return
"https://bugzilla.mozilla.org/show_bug.cgi?id=" +
match[1];
}
}
To install a user script into Firefox, install Greasemonkey, restart Firefox, open the user script, and select "Install User Script..." from the Tools menu.
