Force Safari 7 to open link in the current tab

safari

Suppose I have a site with this code:

<!DOCTYPE html>
<body>
    <a href="https://www.google.com/">1</a><br>
    <a href="https://www.google.com/" target="_blank">2</a><br>
    <a href="https://www.google.com/" onclick="window.open(this.href);return false;">3</a><br>
</body>
</html>

but I do not want to open any new tabs or windows.
I know I can drag the link into the address bar to force open the link in the current tab instead of a new one, but it is too cumbersome.

Is there a more convenient way to do it, like keyboard shortcut or maybe an extension?

Best Answer

Install LinkThing by Canibos. This Safari extension lets you configure how the browser handle the links. You can then choose to open all the onsite and offsite links in current tabs.

Related Question