Show certain links Greasemonkey script

This script is a slightly enhanced version of the simple show links script, by user request. In this version of the script, you specify text which must appear in a link for it to show the full link text in square brackets following the link(s).

To specify the text you want in a link to be displayed, find lines 14- 17:

var showMatchingLinkTextList = [
"www.youtube.com",
"en.wikipedia.org"
];

This list of entries specifies the text which must be found in a link, for one or more matches. So any link containing www.youtube.com or en.wikipedia.org will show the full link text in brackets following the actual link.

Change or add the text you want see for a link, placed inside of quotes. You can specify as many text strings as you want; follow each line with a comma except for the last line. For example, to show links that have www.cnn.com in addition to youtube and wikipedia, use:

var showMatchingLinkTextList = [
"www.youtube.com",
"en.wikipedia.org",
"www.cnn.com"
];

to specify only links that have the text .blogspot.com somewhere in the link, use:

var showMatchingLinkTextList = [
".blogspot.com"
];

As with the original showlinks script, you will want to limit where the script is active by changing the @include line to the website(s) where you want to see the full link text.

Available on userscripts site or the home site.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.