Firefox, hyperlink all links, regular expressions

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,145
Reaction score
10,489
I visit this site that displays non-clickable links, so I found this Firefox extension called "Linkificator" which turns all the links on a page into hyperlinks or clickable links.

The extension works great. It even has a setting to allow you to have it apply only on specific sites (whitelist/blacklist).

But I often tend to copy parts of links by double-clicking on the second half of a URL.

For example:

https://somesite.com/something
https://www.anothersite.org/hereweare-text

But now that all the links are clickable, I have to select the text with the mouse, and it's prone to... delays

So this extension has an option to "Use regular expressions for domains", and I am able to add custom rules.

The current and default rule is this:

Name: URN:NBN Resolver, Redirect to document itself
Pattern: urn:nbn:[a-z0-9]{2,}[:-][^[\]{}<>\\|~^"`\s]+v
URL: http://nbn-resolving.org/redirect/$&

So I don't know anything about regular expressions, and I'm not sure if this is even possible. I mean, everything is possible, but you know.

What I want is for links to get hyperlinked, but only up to a point. For example let's say hyperlink only the first 20 characters of each link:

https://somesite.com/something
https://www.anothersite.org/hereweare-text

So in this instance, the Blue parts would be a clickable hyperlink, and the Red parts would be plain text. BUT the blue parts, if clicked, would actually open the entire link.

So I don't know. Is this possible or am I talking crazy?
 
I visit this site that displays non-clickable links, so I found this Firefox extension called "Linkificator" which turns all the links on a page into hyperlinks or clickable links.

The extension works great. It even has a setting to allow you to have it apply only on specific sites (whitelist/blacklist).

But I often tend to copy parts of links by double-clicking on the second half of a URL.

For example:

https://somesite.com/something
https://www.anothersite.org/hereweare-text

But now that all the links are clickable, I have to select the text with the mouse, and it's prone to... delays

So this extension has an option to "Use regular expressions for domains", and I am able to add custom rules.

The current and default rule is this:

Name: URN:NBN Resolver, Redirect to document itself
Pattern: urn:nbn:[a-z0-9]{2,}[:-][^[\]{}<>\\|~^"`\s]+v
URL: http://nbn-resolving.org/redirect/$&

So I don't know anything about regular expressions, and I'm not sure if this is even possible. I mean, everything is possible, but you know.

What I want is for links to get hyperlinked, but only up to a point. For example let's say hyperlink only the first 20 characters of each link:

https://somesite.com/something
https://www.anothersite.org/hereweare-text

So in this instance, the Blue parts would be a clickable hyperlink, and the Red parts would be plain text. BUT the blue parts, if clicked, would actually open the entire link.

So I don't know. Is this possible or am I talking crazy?

Dude, that's just the lazy way of copy/pasting a link in a new tab/window. Sure, programming can help, but don't let it get in the way of overoptimizing things.

Replacing copy/paste with a plugin, that's not implementation imho.

I rather copy/paste than install an unknown pluign on firefox...
 
Dude, that's just the lazy way of copy/pasting a link in a new tab/window. Sure, programming can help, but don't let it get in the way of overoptimizing things.

Replacing copy/paste with a plugin, that's not implementation imho.

I rather copy/paste than install an unknown pluign on firefox...

Let's say you go through hundreds of links daily.

Choice 1) You double click to select the link, right-click on it to get the menu, click the "open in a new tab" option
Choice 2) You do 1 click with the middle of your mouse

I'm trying to micromanage time. I think, maybe, you wouldn't understand.

Thank you for your comment
 
Let's say you go through hundreds of links daily.

Choice 1) You double click to select the link, right-click on it to get the menu, click the "open in a new tab" option
Choice 2) You do 1 click with the middle of your mouse

I'm trying to micromanage time. I think, maybe, you wouldn't understand.

Thank you for your comment

I totally understand, but replacing copy/paste with a plugin, is just a bit of a stretch imho.
 
jajaja that plugin is like reinventing the wheel when the wheel is good already :p

You're kidding right?

https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com

You select, right-click and open each, and I'll middle click with the mouse, and whoever does it faster wins. $200 bucks. Deal?

If no deal, then the wheel is not good. Different rules apply to a regular user versus, well, me. Hm. Movie scene comes to mind.

 
You're kidding right?

https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com
https://site.com

You select, right-click and open each, and I'll middle click with the mouse, and whoever does it faster wins. $200 bucks. Deal?

If no deal, then the wheel is not good. Different rules apply to a regular user versus, well, me. Hm. Movie scene comes to mind.


I have no problem copy/pasting each link instead of left clicking or middle click each :D
 
I have no problem copy/pasting each link instead of left clicking or middle click each :D

Ok you're either dumb and missing the point or trolling.
 
Try this

Code:
(?=https?:\/\/(www\.)?[a-zA-Z\d\-\.\/]+).{1,20}

Hey thanks man.

Unfortunately it doesn't work, or I don't know how to make it work.

I tried everything that made sense, but no changes to the links. Maybe the extension is broken and doesn't respect custom rules, not sure what the deal is.
 
I found this other extension - https://addons.mozilla.org/en-US/firefox/addon/text-link-webext/

This one doesn't hyperlink the links, but you can do a double click to open a link. This could've worked, but seeing as I tend to copy words by double clicking on them to select them, this won't work.

Also this extension doesn't allow you to whitelist it only on specific sites. So it will work universally, and I don't want that.

So, interesting, but doesn't solve my problem.
 
Back
Top