Created
April 7, 2021 11:28
-
-
Save tpaksu/8d6b7dbf7d10602489729857d2d482fa to your computer and use it in GitHub Desktop.
Open github files in vscode
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 Open github files in vscode | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Taha PAKSU | |
// @match https://github.com/*/tree/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.querySelectorAll("div[role='rowheader'] > span > a").forEach( header => { | |
var d = document.createElement("a"); | |
d.innerText = "Open with VSCode"; | |
d.style = "margin-left: 4px;"; | |
d.href = "vscode://file/" + header.pathname; | |
header.parentNode.appendChild(d); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment