Created
February 27, 2018 10:01
-
-
Save shotasenga/b027ec0c3ef8fec5f3f225a1c0d06984 to your computer and use it in GitHub Desktop.
GM Script to remove target="_blank" attribute on Amazon
This file contains hidden or 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 more BLANK on Amazon | |
// @namespace http://senta.me/ | |
// @version 0.1.0 | |
// @description Remove target="_blank" on Amazon | |
// @author @__senta | |
// @match https?://amazon.co.jp/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
Array.prototype.slice.call(document.querySelectorAll('[target="_blank"][href^="/"]')) | |
.forEach(el => el.removeAttribute('target')) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment