Skip to content

Instantly share code, notes, and snippets.

@nyaapass
Last active June 22, 2023 07:32
Show Gist options
  • Save nyaapass/0e1407262a3d271919205bcfea1aff17 to your computer and use it in GitHub Desktop.
Save nyaapass/0e1407262a3d271919205bcfea1aff17 to your computer and use it in GitHub Desktop.
chrome .crx extension file download api
/**
* https://blog.httpwatch.com/2017/11/15/installing-a-chrome-extension-without-an-internet-connection/
*/
const args = process.argv
if (args.length !== 4) {
console.error('usage: node get-chrome-crx.js chromeVersion extentionID')
} else {
const chromeVersion = args[2] // chrome version (eg. 67)
const extentionID = args[3] // extension id (from chrome store URL)
const API = `https://clients2.google.com/service/update2/crx`
const link = `${API}?response=redirect&prodversion=${chromeVersion}&x=id%3D${extentionID}%26uc`
console.info(link)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment