Skip to content

Instantly share code, notes, and snippets.

@gagan0123
Last active May 12, 2024 20:01
Show Gist options
  • Select an option

  • Save gagan0123/4075c25113ca9bfe9dde88b6ea1f62e7 to your computer and use it in GitHub Desktop.

Select an option

Save gagan0123/4075c25113ca9bfe9dde88b6ea1f62e7 to your computer and use it in GitHub Desktop.

Directly using the latest release of the extension

Using the latest stable release of PSAT extension in Chrome OS is as easy as going to the Chrome Webstore and installing the extension. No additional steps needed to install the extension directly from the Chrome Webstore

Building the Extension locally

  1. Set up Linux in Chrome OS.
    Ref: https://support.google.com/chromebook/answer/9145439?hl=en
  2. Install NVM
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
  3. Clone the PSAT repo
    git clone https://github.com/GoogleChromeLabs/ps-analysis-tool.git
  4. Change directory to the repo
    cd ps-analysis-tool
  5. Source .bashrc so that NVM commands can be run
    source ~/.bashrc
  6. Run NVM install to install the version of Node.JS required by PSAT
    nvm install
  7. Run NVM use to use the version of Node.JS required by PSAT
    nvm use
  8. Switch to the branch you want to build from, eg, develop
    git checkout develop
  9. Install Node dependencies
    npm install
  10. Build the extension
    npm run build

After these steps, you will have the built extension in the directory dist/extension which you can load directly into Chrome by enabling “Developer mode” in the chrome://extensions page and clicking “Load unpacked”

Using Chrome Launcher command for PSAT in Chrome OS

  1. Set up Linux in Chrome OS.
    Ref: https://support.google.com/chromebook/answer/9145439?hl=en
    Needed only if Linux is not already set up!

  2. Install the Chrome launcher script:
    curl -sL https://rt.cx/psat | bash

  3. Install Chrome within that Linux

    wget -P /tmp https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    sudo apt update && sudo apt install -y /tmp/google-chrome-stable_current_amd64.deb
    rm /tmp/google-chrome-stable_current_amd64.deb
  4. Source the .bashrc file again
    source ~/.bashrc

  5. Use the Chrome launcher commands as usual, e.g.
    chrome-default
    chrome-default-ps
    chrome-3pcd
    chrome-3pcd-ps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment