Link Accoutrements

By Paul Irish Last update Sep 20, 2006 — Installed 594 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 10 posts, 8 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
FAOD User

@az1d:
Just add an extra \ to the regular expression so that the . is quoted as regular expression:

var re_pdf = new RegExp("\\.pdf$","i");
...

 
nascent Scriptwright

Great script. I used the original for ages but find this much better.

Any chance you can update this script so that it only picks up on .pdf .doc etc, rather than without the dot, cause I get a lot of false positives.

Thanks for the recommendation of the similar extension, unfortunately I tend to click without hovering.

 
Aaron 2 User

Love it, very cool!

 
Andrew Penne... Scriptwright

I made a prepending one: http://userscripts.org/scripts/show/6539. Thanks for using Creative Commons.

 
B10m Scriptwright

Nice work :)

 
Schlick User

Thanks for the quick response Paul. It works as expected.

 
Paul Irish Script's Author

Hi Michael. I updated the script to do this. If the lastChild of the link element is an IMG, it won't place an image. Hopefully that works nicely. Thanks for the feedback!

 
Schlick User

Is it possible to not display the icons if the link element surrounds an image? For example, an author may have already added icons to their links and linked both the text and the icon. In this case your script will add an extra icon.

 
Schlick User

Fantastic!

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel