Keeps links from opening new tabs by removing the _blank attribute

Latest Version

Version
2.0.1
Update
October 19, 2024
Size
196KiB
Developer
Category
Users
10,000+
Rating
4.50633 ★
Manifest Version
3
Web Store Status
Languages Support
English
See more
Permissions
Storage
See more

Death To _blank Extension

Many web page links use the \"_blank\" target to open in a new tab. This is usually annoying (if I wanted to open a new tab, I would have done so myself!).

Death To _blank removes the \"_blank\" target from links, causing them to open in the current tab. This script also catches a few other targets (such as \"blank\" and \"_new\") that developers use. If you find any targets I've missed, let me know and I'll add them to the list!

You can add pages to a whitelist in the options page, which causes Death To _blank to ignore those pages. I find this useful for sites like GMail that I would rather keep open all the time. You can also specify this as a blacklist, if that suits your fancy.

This script now works on pages that dynamically load additional content using AJAX, such as Facebook and Twitter.


NOTE! This extension does not stop javascript popups (or flash popups, or anything of the like). If you still find links that open up new pages after installing this plugin, they're probably either javascript popups (which I can't do anything about), or other, invalid _blank-like targets (in which case forward me the link and I'll update the extension).


If you have comments/suggestions, please use the Feedback link (or better yet, email me!). Don't post a complaint in your review! I don't get notifications about those. :-(




CHANGELOG

Version 2.0.1 (2024/10/18)
- Fixed a bug where some features are disabled after updating (sorry!).

Version 2.0 (2024/10/15)
- Updates to manifest V3
- Big rewrite under the hood. Settings are not persisted from previous version, sorry. I do this in my spare time and I didn't have the gumption to spend more time on this than it already took to just get the basic functionality working again...

Version 1.9 (2020/10/15)
- Bugfix: previous version of the script did not work when the \"Filter HTML forms\" option was deselected.

Version 1.8 (2017/12/16)
Big change
- Should be noticeably faster (only monitors updated/added elements on page, rather than rescanning the whole page on modification).
- Added ability to enable/disable by clicking on extension button (also added a toggle in the options page).
- Added the __blank (two underscores) target.
- Requires fewer permissions, should be fewer corner cases that it misses.

Version 1.7 (2015/11/25)
- Allows the user to specify what the \"_blank\" target should be rewritten to (don't do this if you don't know what it means!).

Version 1.6 (2015/10/25)
- Now disables _blank (etc.) on the tag as well.

Version 1.5 (2014/03/07)
- Now works on HTML forms as well. Can be disabled in the options menu if you prefer (although please tell me why, if you do!)

Version 1.4.3 (2013/11/8)
- Fixed one more migration bug. Sorry 'bout that.

Versions 1.4.1, 1.4.2 (2013/11/6)
- Fix bugs that wouldn't allow upgraders to use this script (sorry!)

Version 1.4 (2013/11/6)
- Exceptions can now be specified as a blacklist instead of the default whitelist

Version 1.3 (2013/9/15)
- Fixes a javascript development error (probably invisible to most people)
- Upgrades to jQuery 2.0 internally, which may make things a bit faster (but is actually probably completely unnoticeable)

Version 1.2 (2013/7/7)
- Now works with pre-rendered pages (frequently generated from Google searches). As a side-effect, now requires the webNavigation permission to know when new pages are loaded or swapped in.

Version 1.1 (2013/6/1)
- Added _hplink to bad targets, which is used by Huffington Post (don't judge me).

Version 1.0.1 (2013/3/10)
- No changes; reuploading due to bug in Webstore.

Version 1.0 (2013/3/9):
- Now works on dynamically-loaded AJAX content. Useful for sites like Twitter and Facebook.
- Added a whitelist option.
- Now requires permission to view your tabs, so that I can know which page you're browsing (needed for the whitelist).

Version 0.9 (2013/3/3):
- Now catch rel=ext and rel=e, which are sometimes used to open new windows in javascript-based techniques.

Version 0.8 (2012/7/3):
- A change in the previous version meant that my script didn't operate while the page was still loading. Fixed now.

Version 0.7 (2012/7/3):
- Various changes due to Chrome updates. No user-visible changes.

Version 0.6 (2011/6/24):
- Added the _newtab target

Version 0.5 (2011/04/29):
- Now works for file:// URLs as well.

Version 0.4 (2010/10/28):
- No longer needs permission to view your tabs or history (mind you, it wasn't making use of this permission before). It still needs permission to access \"Your data on all websites\", but there's no getting around that -- it rewrites the links on every page you browse!

Version 0.3 (2010/10/28):
- Removes rel=external (which doesn't necessarily open a new window, but some pages use javascript to open such links in new windows).

Version 0.2 (2010/07/21):
- Now blocks the _new target as well.
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "Death To _blank", "version": "2.0.1", "description": "Keeps links from opening new tabs by removing the _blank attribute", "icons": { "48": "images/icon48.png", "128": "images/icon128.png" }, "background": { "service_worker": "background.js" }, "action": { "default_title": "Death To _blank", "default_icon": { "16": "images/icon16.png", "24": "images/icon24.png", "32": "images/icon32.png" } }, "content_scripts": [{ "run_at": "document_start", "all_frames": true, "matches": ["http://*/*", "https://*/*", "ftp://*/*", "file://*/*"], "js": ["lib/jquery-3.2.1.min.js", "lib/jquery.onmutate.min.js", "lib/URI.min.js", "content_script.js"] }], "options_page": "options.html", "permissions": [ "storage" ], "web_accessible_resources": [ { "resources": ["lib/jquery-3.2.1.min.map"], "matches": [""] } ]}
Read more

Similar Extensions

icon

target="_blank"-toggler Extension · Accessibility 10,000+ 1 ★ 255KiB

icon

DetailedTime Extension · Productivity 10,000+ 19 ★ 47.7KiB

icon

Easy to Save Image As (名前を付けて画像を保存) Extension · Accessibility 10,000+ 9 ★ 762KiB

icon

Force Background Tab Extension · Productivity 10,000+ 234 ★ 664KiB

icon

Clickable Links Extension · Productivity 10,000+ 190 ★ 57.51KiB

icon

Tab Position Options Extension · Productivity 10,000+ 140 ★ 25.16KiB

icon

AutoPagerize Extension · Productivity 10,000+ 1022 ★ 302KiB

icon

Youtubeフィルタ Extension · Accessibility 10,000+ 137 ★ 127KiB

icon

Fastr Extension · Productivity 10,000+ 68 ★ 19.58KiB

icon

Link Blanker Extension · Productivity 10,000+ 40 ★ 365KiB

icon

uAutoPagerize Extension · Accessibility 10,000+ 80 ★ 295KiB

icon

Search Result Previews Extension · Productivity 10,000+ 55 ★ 1.94MiB

icon

ato-ichinen Extension · Productivity 10,000+ 24 ★ 43.78KiB

icon

Weblioポップアップ英和辞典 Extension · Productivity 10,000+ 244 ★ 31.97KiB

icon

goodbye "Zenkaku" - さよなら全角英数 Extension · Productivity 10,000+ 73 ★ 280KiB

icon

5CH STYLE FORMAT Extension · Productivity 10,000+ 48 ★ 45.52KiB

icon

TabsPlus Extension · Productivity 10,000+ 245 ★ 50.52KiB

icon

grt memo Extension · Productivity 10,000+ 35 ★ 88.55KiB

icon

Translate Anywhere Extension · Productivity 10,000+ 53 ★ 202KiB

icon

Douga Getter Extension · Productivity 10,000+ 146 ★ 90.72KiB

icon

Gossip Site Blocker Extension · Productivity 10,000+ 81 ★ 102KiB

icon

PageExpand Extension · Accessibility 10,000+ 90 ★ 426KiB

icon

部分強制メイリオちゃん Extension · Productivity 10,000+ 102 ★ 13.33KiB

icon

Selection Search Extension · Productivity 10,000+ 540 ★ 163KiB

User reviews

icon

Timur Bk (ID: 0000005954a677a4) Voted 5 ★ - Updated 11/18/2023 РАБОТАЕТ! наконец-то ссылки в яндекс поиске, яндекс картинках не открываются в новой вкладке!

icon

Yazan Zaid (ID: 000000d458fae451) Voted 5 ★ - Updated 07/15/2023 2023 july, and the extension still working correctly. Thanks.

icon

Mehabr de Gulart (ID: 000000b1e8e6708f) Voted 5 ★ - Updated 06/13/2023 То о чем я так долго мечтал! Спасибо!

icon

DeN OXIGEN (ID: 000000c5ad9fb80b) Voted 5 ★ - Updated 08/15/2022 на конец то)

icon

ワタナベ (ID: 0000001623378a66) Voted 5 ★ - Updated 07/30/2022 Amazonで商品詳細が新規タブで開いてしまうのを防ぐために導入しました。大変便利です。