Open links in current tab

Open links in current tab regardless of _target or site's preferences. Ctrl-click: background tab, Ctrl-Shift-click: foreground tab, Shift-click: new window

These are versions of this script where the code was updated. Show all versions.

  • v2.3.0 2023-11-04

    override

  • v2.2.9 2023-08-30

    improve reliability, retain noopener/noreferrer from window.open() params

  • v2.2.8 2021-09-04
  • v2.2.8 2018-05-17 fix pierceShadow
  • v2.2.7 2017-03-31 Skip links inside shadow DOM such as twitter video play button link
  • v2.2.6 2016-11-24 fixup js links; simplify the if's
  • v2.2.5 2016-11-22 fixup
  • v2.2.4 2016-11-19 Fix middle-click to always open a new background tab
  • v2.2.3 2016-11-01 Use "A" element instead of assigning location.href
  • v2.2.2 2016-10-31 Handle links in iframes
  • v2.2.1 2016-10-25 fixup
  • v2.2.0 2016-10-22 Pierce ShadowDOM
  • v2.1.3 2016-09-24 disregard target=_blank on samesite#differenthash links
  • v2.1.2 2016-09-22 mouseup element should match mousedown element
  • v2.1.1 2016-09-22 prevent dynamically added target=_blank
  • v2.1.0 2016-09-21
  • v2.0.9 2016-09-21
  • v2.0.8 2016-09-21
  • v2.0.7 2016-09-21
  • v2.0.6 2016-09-20 use mouseup event
  • v2.0.5 2016-09-20
  • v2.0.4 2016-09-20
  • v2.0.3 2016-09-20
  • v2.0.2 2016-09-20
  • v2.0.1 2016-09-20
  • v2.0 2016-09-20
  • v1.0 2014-08-22