Created
June 3, 2024 18:38
-
-
Save jazzdan/f07ba64a7fd04ea4b47390e8849b09fd to your computer and use it in GitHub Desktop.
Installing a Chrome extension in the Replay Browser
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
#!/bin/bash | |
url="https://chromewebstore.google.com/detail/magical-ai-writer-autofil/iibninhmiggehlcdolcilmhacighjamp" | |
id=$(echo "$url" | sed -n 's/.*\/\([a-z]\{32\}\)$/\1/p') | |
if [ -z "$id" ]; then | |
echo "Invalid Chrome Web Store URL." | |
exit 1 | |
fi | |
file_path="$HOME/Downloads/${id}.crx" | |
dest="$HOME/Downloads/${id}/" | |
# Download the file | |
curl -L -o "$file_path" "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=125.0.6422.141&acceptformat=crx2,crx3&x=id%3D${id}%26uc" | |
# Check if the file was downloaded successfully | |
if [ -f "$file_path" ]; then | |
# Extract the CRX file | |
unzip -o "$file_path" -d "$dest" || true | |
else | |
echo "Failed to download the file." | |
exit 1 | |
fi | |
echo "Open replay-chromium, navigate to chrome://extensions, enable developer mode and click 'Load Unpacked'. Then open $dest" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment