Created
February 10, 2021 10:49
-
-
Save aiexz/17716b02c02ce56df76d77b858f88fa8 to your computer and use it in GitHub Desktop.
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 View in VSCode | |
// @version 1.0 | |
// @description Option to view repository in online vscode instance | |
// @author @aiexz | |
// @match https://github.com/* | |
// @grant None | |
// ==/UserScript== | |
(function() { | |
//'use strict'; | |
var x = document.getElementsByClassName("file-navigation mb-3 d-flex flex-items-start"); | |
if (x.length){ | |
x = x[0] | |
var btn = document.createElement("a") | |
btn.className = "btn ml-2 d-none d-md-block" | |
btn.href = window.location.href.replace("github.com", "github1s.com"); | |
btn.text = "VSCode online"; | |
x.insertBefore(btn, x.children[x.children.length -1]); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created for https://github.com/conwnet/github1s