Skip to content

Instantly share code, notes, and snippets.

@specious
Last active July 9, 2018 19:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save specious/8239900 to your computer and use it in GitHub Desktop.
Save specious/8239900 to your computer and use it in GitHub Desktop.
Downloads a Google Chrome extension or app from the Chrome Web Store and saves it as a file. You can then unzip the .crx file to see the source code.
#!/bin/bash
if [ $# -lt 1 ]
then
echo Downloads a Google Chrome extension from the Chrome Web Store and saves it as a file.
echo You can then unzip the .crx file to see the source code.
echo
echo For example, if the URL is:
echo https://chrome.google.com/webstore/detail/tile-view/ajcjkemninihecbgljahanflndoeggao
echo
echo Then the extension id is: ajcjkemninihecbgljahanflndoeggao
echo
echo "Usage: $0 <extension-id>"
exit 1
fi
ID=$1
URL="https://clients2.google.com/service/update2/crx?response=redirect&x=id%3D$ID%26uc&prodversion=32"
echo -e "URL => $URL"
curl -o $ID.crx $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment