Created
August 2, 2018 20:57
-
-
Save tayiorbeii/6a1b8c4441590e202f8c88d783271802 to your computer and use it in GitHub Desktop.
Userscript to remove target=_blank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name No New Tabs | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
Array.from(document.querySelectorAll('a[target="_blank"]')) | |
.forEach(link => link.removeAttribute('target')); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really helpful. Thank you.