Created
March 21, 2024 15:28
-
-
Save warrenseine/b4f73b9125dec3d354bb6c7a19daebc4 to your computer and use it in GitHub Desktop.
Duplicate current tab with Cmd + D
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== | |
// ==UserScript== | |
// @name Duplicate tab | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-03-21 | |
// @description Duplicate current tab with Cmd + D | |
// @author Warren Seine | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
window.addEventListener("keydown", e => { | |
if (e.code == "KeyD" && e.metaKey) { | |
window.open(document.location.href, '_blank').focus(); | |
} | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment