Created
September 18, 2019 08:35
-
-
Save xream/8d2fa1d8b233253fdb2aff6f59e9e8b7 to your computer and use it in GitHub Desktop.
Add Install Button for VSCode Insiders(Dirty and quick)
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 Add Install Button for VSCode Insiders | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description | |
// @author @xream | |
// @match https://marketplace.visualstudio.com/items* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const wait = 1 // s | |
const a = 'a.install' | |
const label = '.ms-Button-label' | |
setTimeout(() => { | |
const e = document.querySelector(a) | |
const ne = e.cloneNode(true) | |
ne.setAttribute('href', ne.getAttribute('href').replace('vscode:', 'vscode-insiders:')) | |
ne.querySelector(label).innerText = 'Install(Insiders)' | |
e.parentNode.append(ne) | |
}, wait * 1000) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment