Created
September 12, 2019 16:33
-
-
Save xream/88559091be365b72c94d606c2b310aed to your computer and use it in GitHub Desktop.
UserScript: VSCode Insiders Install Btn
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 VSCode Insiders Install Btn | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://marketplace.visualstudio.com/items* | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
(new MutationObserver(check)).observe(document, { | |
childList: true, | |
subtree: true | |
}); | |
function check(changes, observer) { | |
const install = document.querySelector('#section-banner > div > table > tbody > tr > td.item-header > div > div.ux-item-action > div.installButtonContainer > div > span.ux-oneclick-install-button-container > a') | |
if (install) { | |
install.setAttribute('href', install.getAttribute('href').replace('vscode', 'vscode-insiders')) | |
observer.disconnect(); | |
// code | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment