Why does lemmy have it, so any link takes you off the page instead of opening in a new tab or window?

SnausagesinaBlanket@lemmy.world to No Stupid Questions@lemmy.world – 165 points –

It is a simple line of code and the entire site does this or add target="_blank" to every hyperlink, and it will do the same thing. It sucks that you have to right-click every link to open in a new tab or window and it is such a simple fix.

59

You are viewing a single comment

I prefer the current behaviour.

It's easy to open a link in a new tab without right clicking. You can middle click (Windows and Linux) or command+click (MacOS). However there's no easy way to force a browser to open a link in the current tab if the site wants to use a new tab.

What I hate is when you click on what’s supposed to be an image that you’d expect to expand, but instead it’s a link because the embed isn’t supported. Then when you hit back you lose your place because the page your on isn’t saved and you’ve lost your place trying to get back.

I made this user style to help fix that problem by outlining images, and also make it so when you click an image it expands over the page at full size up to the width of the screen.

Though it's not perfect. If the image is already black it's hard to tell. You could change the outline color to something less common, but that looks ugly. Changing the boundary radius would probably be the best, but it's already marked as !important so I don't think I can change it. I'm open to suggestions on improving that part.

I was almost beginning to think I was browsing the whole web wrong by middle-click-opening a bunch of tabs, then going through them all after I've seen all the interesting headlines.

However there’s no easy way to force a browser to open a link in the current tab if the site wants to use a new tab.

Just hit ctrl+w after clicking the link. That will close the current tab.