Skip to content

Instantly share code, notes, and snippets.

@alanhoyle
Last active May 9, 2022 14:09
Show Gist options
  • Save alanhoyle/87cb4e576a51e8f2df41f30c3ff236af to your computer and use it in GitHub Desktop.
Save alanhoyle/87cb4e576a51e8f2df41f30c3ff236af to your computer and use it in GitHub Desktop.
Force etsy links to open in the same tab/window. (Tampermonkey/greasemonkey/etc)
// ==UserScript==
// @name etsy same window
// @namespace http://tampermonkey.net/
// @version 0.1
// @description stop etsy from opening new tabs for everything
// @author Alan Hoyle
// @match https://www.etsy.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
// setTimeout(timer, 1000);
var a = document.getElementsByTagName('a');
for (var idx= 0; idx < a.length; ++idx){
a[idx].removeAttribute("target")
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment