VSCode Extensions Download

VSCode应用市场移除了.vsix插件各个版本的下载链接,这个脚本可以帮你加回插件各个版本的下载链接

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         VSCode Extensions Download
// @namespace    https://marketplace.visualstudio.com
// @version      1.0.0
// @description  VSCode应用市场移除了.vsix插件各个版本的下载链接,这个脚本可以帮你加回插件各个版本的下载链接
// @author       qaulau
// @match        *://marketplace.visualstudio.com/items?itemName=*
// @icon         https://marketplace.visualstudio.com/favicon.ico
// @require      https://code.bdstatic.com/npm/[email protected]/dist/jquery.min.js
// @grant        GM_addStyle
// @tag          vscode
// @license      AGPL-3.0-or-later
// ==/UserScript==

(function() {
    'use strict';
    var $ = window.jQuery;
    var timerId = setInterval(function(){
        if($('table.version-history-table').length == 0){
            return ;
        }
        GM_addStyle('.version-history-top-container .version-history-container-column {width: 20%;}');
        clearInterval(timerId);
        let data = JSON.parse($('.jiContent').text());
        let baseUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/' + data.Resources.PublisherName + '/vsextensions/' + data.Resources.ExtensionName + '/';
        // 添加下载行
        $('thead.version-history-table-thead > tr').append('<th class="version-history-container-column"></th><th class="version-history-container-column"></th>');
        // 遍历添加下载链接
        $('tbody.version-history-table-body > tr').each(function(i, e){
            let version = $.trim($(e).find('td').first().text());
            let url = baseUrl + version + '/vspackage';
            $(e).append('<td class="version-history-container-column"></td><td class="version-history-container-column"><a href="'+url+'">Download</a></td>');
        });
    }, 100);
})();