Created
March 7, 2023 14:24
-
-
Save jabas06/d7c2ba228a72e10ecaf7ab21de603833 to your computer and use it in GitHub Desktop.
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 | |
################################################################################ | |
# Starts Chrome with CORS disabled on a new profile. | |
# Will suggest to install MODHEADER extension if not already installed. | |
################################################################################# | |
PROFILE_PATH="$HOME/Library/ChromeDevProfile" | |
BROWSER_INSTALLATION_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" | |
MODHEADER_ID="idgpnmonknjnojddfkpgkljpfnnfcklj" | |
MODHEADER_PATH="$PROFILE_PATH/Default/Extensions/$MODHEADER_ID" | |
MODHEADER_URL="https://chrome.google.com/webstore/detail/modheader/$MODHEADER_ID" | |
OPEN_PAGES="http://localhost:3000" | |
if [[ ! -d "$MODHEADER_PATH" ]] | |
then | |
#Tabs for first time dev browser setup | |
OPEN_PAGES="$MODHEADER_URL $OPEN_PAGES" | |
fi | |
open -n -a "$BROWSER_INSTALLATION_PATH" \ | |
--args --user-data-dir=$PROFILE_PATH \ | |
--no-first-run --no-default-browser-check \ | |
--disable-web-security \ | |
$OPEN_PAGES | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment