117
submitted 1 year ago by p1mrx@sh.itjust.works to c/firefox@lemmy.ml

After using Chrome for a decade and switching back to Firefox, one feature I missed was the ability to right-click and Go to [url] directly, for any selected text that vaguely resembles a URL.

I made Goto foo to approximately replicate Chrome's behavior in Firefox, but it would be nice if no extension were necessary.

all 39 comments
sorted by: hot top controversial new old
[-] oxideseven@lemmy.ca 62 points 1 year ago

Huh? Firefox does this though. Highlight an address and right click then select open in new tab or whatever.

[-] p1mrx@sh.itjust.works 11 points 1 year ago

That doesn't work in many cases, like the example in the screenshot.

[-] unexposedhazard@discuss.tchncs.de 23 points 1 year ago

IP adresses are pretty edge case yeah. I dont know if that should even be supported. The "example.com" does actually work tho, its just if you only include ".co" in your selection, it doesn’t recognize it as a URL even tho .co is the national TLD of Colombia. But all that really needs to change is to support all existing TLD'S and maybe IP addresses if there is community interest in it.

[-] p1mrx@sh.itjust.works 8 points 1 year ago* (last edited 1 year ago)

I don't think .co versus .com is the relevant factor. I can select xample.co by itself, but not as a substring of http://www.example.com. The rules seem so arbitrary and context-dependent that it behaves more like a dice roll than a usable feature.

If a selection to URL feature cares about TLDs, IP addresses, or text beyond the selection range, then it's operating at the wrong abstraction layer. (well, technically Goto foo has a couple lines of code to [bracket] bare IPv6 addresses, but that's not core functionality.)

[-] LollerCorleone@kbin.social 7 points 1 year ago

In such cases, you can just highlight and drag the text to the address bar.

[-] Aatube@kbin.social 1 points 1 year ago

www.example works, but www.exampl doesn't. Perhaps there's a minimum character count to trigger it...

[-] vox@sopuli.xyz 8 points 1 year ago

maybe because example is a tld?

[-] Aatube@kbin.social 2 points 1 year ago

Example is a freaking TLD?

[-] vox@sopuli.xyz 1 points 1 year ago* (last edited 1 year ago)

it's not a publicly registrable, but it's reserved by IETF/IANA for use on e.g. local networks or for documentation and is technically a valid tld.

[-] GissaMittJobb@lemmy.ml 0 points 1 year ago
[-] vox@sopuli.xyz 1 points 1 year ago

this list doesn't include reserved TLDs

[-] clearleaf@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

I ran into this not long after seeing this post. This site disables links and the options aren't there. I find the context menu is pretty strange in general. But the problems it causes are small and easy to move on from so it's never really questioned. It honestly seems to have a mind of it's own sometimes. Not nearly as bad as the windows explorer context menu though.

[-] Voltage808s@kerala.party 23 points 1 year ago* (last edited 1 year ago)

the first option when you right click a text vaguely resembling a link is “open link in new tab” or something like that. Its the same thing as go to [url]

[-] yote_zip@pawb.social 22 points 1 year ago

I highlight the URL text, then drag it to my tab bar to open it. That could be an option if the workflow is not too annoying to use.

[-] lemann@lemmy.one 11 points 1 year ago

I do the same

Another option i'm aware of is CTRL+C, T, V and enter (Keyboard combo to Copy, open new tab, paste, go)

[-] p1mrx@sh.itjust.works 10 points 1 year ago

Interesting, that does appear to solve the same problem.

In my decades of using web browsers, I can't say that I've ever tried dragging text to the address bar. That's not very discoverable, and the drag action messes with the page's scroll position.

[-] Euphoma@lemmy.ml 9 points 1 year ago

You can also drag it to the tab bar to add it as a new tab.

[-] craigevil@lemmy.ml 15 points 1 year ago

open about:config change middlemouse.contentLoadURL from false to true.

[-] paraphrand@lemmy.world 11 points 1 year ago

Don’t let everyone “well actually” you, here. The fact you are making this robust is great.

Feature idea: holding down Alt/Option changes the menu to open in a new tab.

[-] p1mrx@sh.itjust.works 1 points 1 year ago

'New Tab' is the default/only behavior currently.

I notice that Chrome supports Ctrl-click (background tab) and Shift-click (new window), and Firefox provides a modifiers array, so I think I could replicate this.

[-] paraphrand@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

Oh, sounds good. It would be best to follow similar conventions. I’m a Safari person, so I didn’t know New Tab was default in Firefox. Making the menu say it will be a new tab would be good.

[-] p1mrx@sh.itjust.works 2 points 1 year ago

I've added support for Ctrl/Command/Shift in v1.7, but the menu text is unchanged because I don't know which keys are pressed prior to the click event. This matches Chrome's behavior.

[-] akilou@sh.itjust.works 11 points 1 year ago

Highlight it and drag it up to the tabs bar. It'll open in a new tab. Or drag it onto an existing tab and it'll open in that tab. Highlight any arbitrary text, do the same, and it'll search that text in your default search engine.

[-] kubica@kbin.social 7 points 1 year ago

Maybe it is more visible that way, but the same can be done clicking on open link or open in private window.

[-] p1mrx@sh.itjust.works 4 points 1 year ago

Firefox's 'Open Link' feature is quite limited compared to Chrome. For example, try navigating to lemmy.ml using the "Firefox@lemmy.ml" link in the sidebar.

Even in cases where it works, it doesn't preview the link target in the context menu.

[-] dustyData@lemmy.world 3 points 1 year ago

I just did exactly that, with both the link in the sidebar and the substring “lemmy.ml” from the full “firefox@lemmy.ml” string in your comment. It works different on Firefox, I suppose as a by product of being implemented differently, but it's not less powerful. Your plugin is cool and all, but it's use is extremely niche to save fractions of a second.

[-] LollerCorleone@kbin.social 2 points 1 year ago

I did exactly that and it works.

[-] p1mrx@sh.itjust.works 1 points 1 year ago

When I highlight the trailing lemmy.ml and select Open Link in New Tab, Firefox takes me to https://sh.itjust.works/c/firefox@lemmy.ml (the original link target) instead of https://lemmy.ml

[-] LollerCorleone@kbin.social 1 points 1 year ago

I don't know what wrong with your browser set up but it takes me properly to lemmy.ml

Hi there! Looks like you linked to a Lemmy community using a URL instead of its name, which doesn't work well for people on different instances. Try fixing it like this: !firefox@lemmy.ml

[-] mr_strange@discuss.tchncs.de 5 points 1 year ago

Netscape, then Mozilla, then Firefox had this feature on middle-button-click for literally decades. Firefox devs killed it years ago, despite howls of protest.

You could literally highlight any text, anywhere, and a middle-click in the browser window would navigate there. It was awesome. Basically a web equivalent of X-windows' middle-click paste feature.

[-] maxele@lemmy.ml 0 points 1 year ago

You can enable it in about:config

[-] mr_strange@discuss.tchncs.de 2 points 1 year ago* (last edited 1 year ago)

No you can't. The code was changed years ago to only work if the text in the PRIMARY buffer "sort of looks like it might be a URL".

That defeats the whole point of the feature. If someone has written "go to example.domain, it's amazing", without bothering to make "example.domain" a link anchor, or even prepending "https://", then there's no easy way to actually visit the site. Previously, I could just select the text I wanted, middle-click into a browser window, and hey presto. Doesn't work any more.

[-] Illuminati@lemmy.world 4 points 1 year ago

Might not be exactly what you're looking for but check out Linkify Plus Plus, it converts text to an URL when possible. It's pretty amazing, been using it since I can remember.

[-] tubbadu@lemmy.kde.social 3 points 1 year ago
[-] olafurp@lemmy.world 3 points 1 year ago

Use double click to highlight instead of single click to select words instead of characters.

[-] dhtseany@lemmy.ml 2 points 1 year ago* (last edited 1 year ago)

I agree with you 100% and highlighting text and choosing the new tab option isn't always viable. I often have to copy text from outside the browser and paste it into the address bar, I really miss that feature of Chrome.

Edit: why the down votes? He makes a fair point that some of you are disagreeing with without considering that there are those out there that use their browsers differently than yourself. Even if I used Firefox as my primary browser for the last 3 years I'm still able to be honest about my experience.

this post was submitted on 01 Nov 2023
117 points (91.5% liked)

Firefox

17302 readers
1 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS