Bug 237095

Summary: Disallow webpages opening new tabs
Product: rekonq Reporter: wrathful.mite
Component: generalAssignee: Andrea Diamantini <adjam7>
Status: RESOLVED FIXED    
Severity: wishlist CC: adrian
Priority: NOR    
Version: 0.4.0   
Target Milestone: ---   
Platform: Ubuntu Packages   
OS: Unspecified   
Latest Commit: Version Fixed In:

Description wrathful.mite 2010-05-10 12:57:04 UTC
Version:           0.4.0 (using KDE 4.4.2)
Installed from:    Ubuntu Packages

Webpages are allowed to specify that a link should open in a new tab (or new window). Some websites abuse that so that many of the links open in new tabs — particularly for other sites — while others simply use it inappropriately. I'd like to be able to override that so that when you click on a link, regardless of what the site's telling you, it opens in the same tab. It should be taken as 'advice' rather than an 'order', so if I want to, I can still use the middle mouse button (or whatever other method) to open the link in a new tab (or window).
Comment 1 Adrián Chaves (Gallaecio) 2012-08-04 07:31:03 UTC
Do you thing the feature request in https://bugs.kde.org/show_bug.cgi?id=303911 , while following a different approach, provides you with what you need?
Comment 2 wrathful.mite 2012-08-04 09:14:54 UTC
The only problem with the linked bug is you need to know beforehand that a link will open in a new tab. Other than that, it's a perfectly good solution.
Comment 3 Adrián Chaves (Gallaecio) 2012-08-04 09:18:26 UTC
I believe Konqueror (KHTML) displays a different cursor depending on the target, so you know beforehand where the linked document is going to be opened. Maybe Rekonq needs something like that.
Comment 4 wrathful.mite 2012-08-04 10:42:57 UTC
(In reply to comment #3)
> I believe Konqueror (KHTML) displays a different cursor depending on the
> target, so you know beforehand where the linked document is going to be
> opened. Maybe Rekonq needs something like that.

That would be good.
Comment 5 Andrea Diamantini 2012-08-14 15:22:06 UTC
Git commit 495d83777e2eaa7c7d604009cc99a446e2964f90 by Andrea Diamantini.
Committed on 14/08/2012 at 16:59.
Pushed by adjam into branch 'IconLink'.

Guess if url is on target blank and eventually show a describing icon

We show "window-new" or blank target links and "mail-message-new"
on mailto ones. The same as Konqueror does :)

Also, based on the hovering guess, shown different contextual menus
Related: bug 303911

M  +2    -0    src/CMakeLists.txt
M  +135  -12   src/webview.cpp
M  +7    -1    src/webview.h

http://commits.kde.org/rekonq/495d83777e2eaa7c7d604009cc99a446e2964f90
Comment 6 Andrea Diamantini 2012-08-14 15:43:40 UTC
Managing together with bug 303911. Please, check new on https://git.reviewboard.kde.org/r/105739/ about. Closing as duplicate to not forget about. Regards,

*** This bug has been marked as a duplicate of bug 303911 ***
Comment 7 Andrea Diamantini 2013-03-11 18:02:25 UTC
Git commit c7fa562d5e2bf312700b1f02863535887f80ba48 by Andrea Diamantini.
Committed on 11/03/2013 at 18:59.
Pushed by adjam into branch 'master'.

Guess if url is on target blank and show different contextual actions

I would not re-enable the "describing" icon part because it is NOT
really working here. I'm having troubles when I show the icon and
switch pages.
Hope this is enough
Related: bug 303911

M  +69   -9    src/webtab/webview.cpp
M  +4    -0    src/webtab/webview.h

http://commits.kde.org/rekonq/c7fa562d5e2bf312700b1f02863535887f80ba48