Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Super Linkifier

Create clickable links from plain text.

I modified the framework from Linkifier Plus to handle almost any URL.
I also added link customization.

In the top lines that mostly begin with //, there's an Options section. You can customize how the variables there to change how the links are displayed or if they are customized at all.

The variables simply contain values accepted by corresponding CSS properties. The comments after each line show what values can go in the quotes.

If you want to customize the link display, you must change line 17 var customizeLinks = false to var customizeLinks = true. Customization variables are on the following lines.

To make the link appear after the text instead of linkifyinig the text, change line 25 var linkAfterText = false; to var linkAfterText = true;. Customization variables are on the following lines.

To enable Pagerization support, you have to change line 30: var pagerization = false; to var pagerization = true;.

Version 1.2 adds an option to make the link after the text and customize how it appears.
Version 1.1 fixes a bunch of problems I created; it shouldn't linkify formatted text that uses "." and "/" now.
Version 1.0 changes filters a bit to be more effective and limiting.
Version 0.9 adds support for the Pagerization script, as well as a small filter change (0.8).

Please tell me about any problems with the script in the comments.






Jun 28, 2008
anonymous_user User

Two examples I would like linkified:

example.com
subdomain.example.com

 
Jun 19, 2008
AbVag User

I had the Linkification extension for a long while and it served me well. Upon the download and installation of Firefox 3, I lost that extension. I thank you for being there on the rebound. :-)

Oh and to Some Girl: A better way to make the distinction between regular links and the Super Linkifier links is to:
1) At var customizeLinks = false;, change false to true.
2) Play the heck out of the stuff below. For me, I added in a font-family to the linkExtras section so that all the SL links will have a unique font to them.

 
Jun 11, 2008
Some Girl User

Great script!

I made one change -- directly below linky.className = "superLinkifier";, I added:

linky.title = "plain text linked with superLinkifier";

So I'd have some way to tell if a link had been linkified vs. having been an actual link in the first place. (For those who aren't sure what this does: when I hover over a link, that text will appear if the script linkified it. If it was already linked to begin with, that text will not appear.)

 
May 21, 2008
jab416171 User

A lot of those links on the testcases.txt page don't work.
One ftp (ends in a period)
and 5-10 of every category after that, with the exception of the last category (images)

Firefox automatically splits long text files into multiple text nodes,
and a couple of the splits happen to be right in the middle of some links on this page.
This is why a couple text links are not fully linkified.

Is there any way to disable that?

 
Feb 28, 2008
Daniel Philpott User

User 'sweeeetah' has posted the SuperLinkifier script with FinalDoom's name replaced with someone else's name. That's the only change. But he posted it more recently it looks like an update on the search page (already has 227 installs).

 
Dec 26, 2007
Diezi User

h2oz7v, this script works wonderful with Opera. I've tested it with Opera 9.2x on WinXP.
Thank you very much!

Note: you have to use the name xxxx.users.js if you want it work in Opera.

 
Dec 11, 2007
h2oz7v User

Is there a way of making this script work for Opera?

 
Nov 2, 2007
azulmarino User

Does not work for this example source code:


<font>
http://refer.ccbill.com/cgi<wbr>-bin/clic...</wbr></font>

 
Sep 26, 2007
FinalDoom Script's author

I like your ideas. Thanks for the comments. I don't have much time in college right now, but at some point I may do a complete rewrite, and be able to do some of the things you and others have suggested.

 
Sep 10, 2007
Daniel Dawson Scriptwright

Oops, I guess HTML comments don't work here. Let me try that a different way:

"w w w . e x a m p l e . c o m" should not appear as "http://www.example.com/".

 
Sep 10, 2007
Daniel Dawson Scriptwright

Hi. First of all, this is an excellent linkifier. I'm using it now. A few comments on the comments:

Everyone is wondering why certain patterns work here but not elsewhere. The answer is simple. Read the notes that appear when you enter a comment here: "We help break your paragraphs and link your links." (Emphasis added.) It's us.o that is creating those links, not the userscript. (If you want proof, just View Source: changes to the DOM, which userscripts make, don't reflect in the source view.)

As for the issue of split text nodes, I don't agree there's nothing you can do about it. It would require modifying your code structure a bit, but when parsing a URL, you could check for a sibling text node. The only trouble is, you would no longer be able to get an XPathResult with UNORDERED_NODE_SNAPSHOT_TYPE. But I think you could use ORDER_NODE_SNAPSHOT_TYPE, and for each node, check if there are more items in the snapshot, and if so, whether the current item's nextSibling is the same as the next item in the snapshot. But as you said, it's a rare occurrence, so you decide whether it's worth the trouble and CPU.

One more thing: I don't like having the text content altered. So e.g. "www<!-- -->.example<!-- -->.com" should not appear as "http<!-- -->://www<!-- -->.example<!-- -->.com/". It would be nice to have an option to keep all the text as is, and only have the alterations in the hrefs. OTOH, looking at the code, it's clear that trying to implement such a thing would probably be an awful hack, due to the preprocessing done in fixLinks. I guess starting over is the best way to do it.

But again, this is an excellent linkifier, much better than its predecessors. Thanks.

 
Aug 31, 2007
FinalDoom Script's author

Sorry it's been a long time. I have been very very busy, moving, out of town, etc.

I searched Omerta, and it seems to work on the one with a link. It might have just been the same thing on the testcases.txt page, where firefox divides the text node right in the middle of the link.

I uploaded my copy of the script just in case.

 
Aug 13, 2007
Webb User

The pic is a screenshot of the userstyles.org main page immediately after installing the script.

The current link is http://userscripts.org/?page=2

 
Aug 12, 2007
FinalDoom Script's author

Webb, please link to that page. I can't do anything with an image. For all I know, it's not linkifying right because the person who wrote the thing put a half link or some formatting that the script won't handle.

 
Aug 12, 2007
pojo Scriptwright

i like it :)

 
Aug 12, 2007
Webb User

I have never found one of these scripts that works.

Photo Sharing and Video Hosting at Photobucket

 
Aug 12, 2007
FinalDoom Script's author

I had it linkifying subdomain.example.com and 192.168.0.1 before but that raised issues with the things in mikeon and treymon's comments.

A few of the lines on testcases.txt don't likify right because the entire page is one huge textnode, so firefox splits it into 5 or so, sometimes in the middle of a link. Nothing I can do about that-it's a rare occurance.

Good idea with the [link] thing. I'll see about adding that in.

 
Aug 9, 2007
Lucanos Scriptwright

ADDITIONAL - And yet somehow, the script linkified those strings properly here, but not on the Testcases page...

Strange.

 
Aug 9, 2007
Lucanos Scriptwright

Excellent adaptation of an excellent adaptation of an excellent script...

When reviewing the test cases at http://yellow5.us/firefox/testcases.txt I found only one or two possible issues/failures/opportunities for improvement.

ftp://user:password@192.168.0.1/test/.
Linkified to ftp://user:password@192.168.0

irc://www.example.com/test/.
Linkified to irc://www.example.com

http://user@www.example.com/test/.
Linkified to http://user@www.example.com

As a possibly suggestion for some of the more common patterns (which do not seem to be Linkified by most of this branch of Userscripts, such as:

192.168.0.1
192.168.0.1.
subdomain.example.com
subdomain.example.com.

Possibly allowing for a link to be inserted after them like "[link]" could prove handy (again, if able to be toggled on and off within the script itself, even if defaulting to off.

 
Aug 7, 2007
FinalDoom Script's author

Now, with 1.1, it shouldn't linkify anything mistaken for a URL that was presented in the comments. Ought to fix similar things in general as well.

 
Aug 7, 2007
FinalDoom Script's author

Updated to 1.0.4 fixing some of the things I screwed up - user:pass, parenthases, etc. Took out simple IP support. It has to have a slash now, i.e. 127.0.0.1/.
Temporary release until I can figure out how to fix the time/date and formatted text things.

 
Aug 6, 2007
treymon User

this also turns software version numbers into links
"version 5.5.6" or something similar to that will turn into a mess
also something like "44.1kHz/192kbps" will become a link

 
Aug 6, 2007
FinalDoom Script's author

Oh, and the user:pass thing too. I think I know what's causing that, though not sure. It's been a while. I'll get it fixed as soon as I can. Sorry about that. It was working before and I screwed it up. ^^;

 
Aug 6, 2007
FinalDoom Script's author

Blarg. Sorry, I haven't checked in for a while. Been way too busy. Ought to have a small update out in a few days.

You seriously write time and dates like that? o.O
I'll see what I can do about that.

I'll have to look at my code again and see why it is putting the parentheses into the link on that page. My initial reaction would be that the writer is using a different language that has english letters and a different paren ender. I'm not sure, though, they look the same. I'll look into it.

Thanks for the bugs. ^^

 
Aug 3, 2007
mikeon User

This turns into a link
5:00 p.m./aug-2-07/5:15 p.m.

Becomes

5:00 ---> http://p.m./aug-2-07/5 <--->

Added in the ---> to show what became a link

You could comment on this script if you were logged in.