Skip to content

On how to install Githunt in Chrome #77

@huajianmao

Description

@huajianmao

Chrome is saying they do not support this anymore. But we can build it and 'load unpacked' manually.


Since Chrome has deprecated Manifest V2, the original GitHunt code will no longer load. We can manually patching the code to meet Manifest V3 standards and fixing the Node.js build errors.

🛠️ Prerequisites

Ensure you have downloaded githunt code, and cd into the githunt root directory in your terminal and have run npm install.


Step 1: Fix OpenSSL & CSP (package.json)

We need to do two things here: fix the Node v17+ OpenSSL error, and force React to disable inline runtime scripts (which are strictly forbidden in Manifest V3).

  1. Open package.json in the root directory.
  2. Locate the "scripts" section.
  3. Replace the "build-chrome" line entirely with this command:
"build-chrome": "export NODE_OPTIONS=--openssl-legacy-provider && INLINE_RUNTIME_CHUNK=false react-scripts build",

Why this is necessary:

  • --openssl-legacy-provider: Fixes the digital envelope routines::unsupported error on your Node.js v22.
  • INLINE_RUNTIME_CHUNK=false: Tells Webpack not to embed the JS runtime directly into index.html. If you skip this, Chrome will block the extension with a "Content Security Policy (CSP)" error, and you will see a blank white screen.

Step 2: Upgrade to Manifest V3 (public/manifest.json)

We must rewrite the manifest file to remove deprecated fields (like browser_action) and update the version.

  1. Open public/manifest.json.
  2. Delete everything in the file.
  3. Paste the following Manifest V3 compliant code:
{
  "manifest_version": 3,
  "name": "Githunt",
  "short_name": "Githunt",
  "description": "Replace the new tab with a list of trending repositories on github belonging to any technology that you chose.",
  "version": "3.9",
  "permissions": [
    "storage",
    "*://*.github.com/*"
  ],
  "icons": {
    "16": "/img/icon16.png",
    "48": "/img/icon48.png",
    "128": "/img/icon128.png"
  },
  "chrome_url_overrides": {
    "newtab": "index.html"
  },
  "homepage_url": "http://kamranahmed.info/githunt",
  "action": {
    "default_title": "Githunt",
    "default_icon": "/img/icon128.png"
  }
}

Key Changes:

  • manifest_version: set to 3.
  • browser_action: changed to action.

Step 3: Build the Project

Run the modified build command in your terminal:

npm run build-chrome

If successful, you will see Compiled successfully and a build folder will be created in your project root.


Step 4: Load Unpacked Extension

  1. Open Chrome and go to chrome://extensions.
  2. Enable Developer mode (top right toggle).
  3. Click Load unpacked (top left).
  4. Important: Select the build folder you just created (do not select the githunt root folder).

🎉 Verification

Open a new tab (Cmd+T). You should see the GitHunt interface.

#76 #74

githunt.built.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions