-
-
Save Mr-xzq/6f2d395533fc16b94de3e6504631217c to your computer and use it in GitHub Desktop.
Download VS Code extensions as VSIX
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
| An VS Code extension's offline install package (VSIX) is available at: | |
| ``` | |
| https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${extension_name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage | |
| ``` | |
| Take the syntax highlight extension for Vue.js as an example: | |
| ``` | |
| https://marketplace.visualstudio.com/items?itemName=liuji-jim.vue | |
| ``` | |
| - The publisher is `liuji-jim`. | |
| - The extension name is `vue`. | |
| - The latest version number is in **More Info** section on the right side. | |
| So the package can be downloaded via this URL: | |
| ``` | |
| https://liuji-jim.gallery.vsassets.io/_apis/public/gallery/publisher/liuji-jim/extension/vue/0.1.3/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage | |
| ``` | |
| After download, just rename the file extension to `*.vsix`. In VS Code, select **Install from VSIX...** in the extension context menu. |
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
| javascript:void function(){var e=document.querySelector('[data-bind$="version"]').innerText,t=window.location.href.replace(/.*itemName=(.*?)\.(.*)/,"$1"),i=window.location.href.replace(/.*itemName=(.*?)\.(.*)/,"$2"),o=document.createElement("a");o.innerText="Download VSIX",o.style.position="fixed",o.style.right="0",o.style.top="120px",o.style.padding="10px 15px",o.style.background="#007acc",o.style.color="#fff",o.href="https://"+t+".gallery.vsassets.io/_apis/public/gallery/publisher/"+t+"/extension/"+i+"/"+e+"/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage",document.body.appendChild(o)}(); |
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
| void function() { | |
| var ver = document.querySelector('[data-bind$="version"]').innerText | |
| var pub = window.location.href.replace(/.*itemName=(.*?)\.(.*)/, '$1') | |
| var name = window.location.href.replace(/.*itemName=(.*?)\.(.*)/, '$2') | |
| var button = document.createElement('a') | |
| button.innerText = 'Download VSIX' | |
| button.style.position = 'fixed' | |
| button.style.right = '0' | |
| button.style.top = '120px' | |
| button.style.padding = '10px 15px' | |
| button.style.background = '#007acc' | |
| button.style.color = '#fff' | |
| button.href = 'https://' + pub + '.gallery.vsassets.io/_apis/public/gallery/publisher/' + pub + '/extension/' + name + '/' + ver + '/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage' | |
| document.body.appendChild(button) | |
| }() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment