Last active
June 22, 2023 07:32
-
-
Save nyaapass/0e1407262a3d271919205bcfea1aff17 to your computer and use it in GitHub Desktop.
chrome .crx extension file download api
This file contains 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
/** | |
* 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