// open extension page // copy-paste this code to browser console (async () => { const match = location.href.match(/itemName=([^&]+)/); if (!match) { console.error('Tidak dapat menemukan itemName di URL.'); return; } const [publisher, extensionName] = match[1].split('.'); const apiUrl = `https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery`; const body = { filters: [{ criteria: [{ filterType: 7, value: `${publisher}.${extensionName}` }] }], flags: 103 }; const res = await fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json;api-version=3.0-preview.1' }, body: JSON.stringify(body) }); const json = await res.json(); const extension = json.results[0].extensions[0]; const version = extension.versions[0].version; const vsixAsset = extension.versions[0].files.find(f => f.assetType === 'Microsoft.VisualStudio.Services.VSIXPackage'); const vsixUrl = vsixAsset.source; const vsixRes = await fetch(vsixUrl); const blob = await vsixRes.blob(); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = `${extensionName}-${version}.vsix`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(a.href); })();