Skip to content

Instantly share code, notes, and snippets.

@xream
Created September 18, 2019 08:35
Show Gist options
  • Save xream/8d2fa1d8b233253fdb2aff6f59e9e8b7 to your computer and use it in GitHub Desktop.
Save xream/8d2fa1d8b233253fdb2aff6f59e9e8b7 to your computer and use it in GitHub Desktop.
Add Install Button for VSCode Insiders(Dirty and quick)
// ==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