Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧩 ChromeMod

Declarative Chrome WebUI Patcher

Modify Chrome's internal New Tab Page, settings UI, PDF viewer, and more — using simple JSON manifests.
No extensions. No dev tools. Pure resource-level patching.

Windows Python 3.10+ Chrome 130+ Zero Dependencies MIT License

ChromeMod New Tab Page Preview
Glassmorphism theme, Zen Focus mode, Last.fm Now Playing, and Hacker News feed running on Chrome.


📖 What is ChromeMod?

ChromeMod patches Chrome's compiled resources.pak binary to inject custom CSS, JavaScript, and HTML directly into Chrome's internal WebUI pages — the ones that extensions cannot touch (chrome://, chrome-untrusted://).

Each mod is a self-contained JSON manifest. Drop it into patches/, run the patcher, and Chrome's UI changes on the next launch. No browser restart loop, no flag flipping, no manifest v3 limitations.

How it works

patches/*.json  →  PatcherEngine  →  resources.pak (patched)
                       ↓
              1. Backup original .pak
              2. Decompress gzipped resources
              3. Apply regex find/replace per manifest
              4. Recompress & repack
              5. Register auto-patcher task

The engine automatically detects the latest Chrome version directory, handles gzip-compressed resources, and creates atomic backups for safe rollback.


⚡ Quick Start

Prerequisites: Windows 10/11 · Python 3.10+ (added to PATH) · Google Chrome

1. Clone & enter the repo

git clone https://github.com/sdwck/ChromeMod.git
cd ChromeMod

2. Pick your mods

Copy any manifests from examples/ into the patches/ directory:

# Example: enable Hacker News feed and native PDF Dark Mode
copy examples\hacker_news_feed.json patches\
copy examples\pdf_dark_mode.json patches\

3. Close Chrome & apply

# Double-click ChromeMod.cmd — or run manually:
.\ChromeMod.cmd

That's it. Open Chrome and hit Ctrl+T. No venv, no pip install, no dependencies — the entire engine runs on Python's standard library.

Uninstalling

.\Uninstall.cmd

Restores the original resources.pak from backup and removes the scheduled auto-patcher task.


🧱 Available Mods

All mods live in examples/. Copy the ones you want into patches/ to activate them.

Module Description
Hacker News Feed Live top-50 HN stories widget on New Tab Page. Strict 24h freshness & ≥20 points filter, randomized 5-headline selection on each tab.
Last.fm Now Playing Displays your currently playing track with album art, animated equalizer, and YouTube search link. To set your username: press F12 → click Console tab → paste localStorage.setItem('lastfm_username', 'your_name') → press Enter.
PDF Dark Mode Injects a dark mode toggle directly into Chrome's native PDF viewer toolbar. One-click inversion without extensions.
NTP Glassmorphism Applies frosted glass blur (glassmorphism) to the NTP search bar and surrounding UI elements.
Unlimited Shortcuts Removes the 10-shortcut cap on the New Tab Page. Makes the grid responsive and persists extra shortcuts via localStorage.
AMOLED Pitch Black Converts Chrome's dark gray Dark Mode into true #000000 AMOLED black. Saves battery on OLED displays.
Zen Focus Mode Strips the New Tab Page down to a single centered search bar. Hides logo, shortcuts, news, and all chrome.
Remove Google Logo Hides the Google doodle/logo and shifts the search bar to the top of the New Tab Page.
Sharp Corners Replaces all Material You pill-shaped buttons (100px border-radius) with clean sharp rectangles across the entire browser UI.
Hide Managed by Org Removes the "Managed by your organization" badge from settings, menu, and downloads pages.

🔧 Creating Your Own Mod

Each mod is a single .json file describing what to find and replace inside Chrome's internal resources. Here's a minimal example:

{
  "id": "my_mod",
  "name": "My Custom Mod",
  "version": "1.0.0",
  "modifications": [
    {
      "description": "Change the NTP background color",
      "targets": ["698"],
      "replacements": [
        {
          "find": "background-color:#fff",
          "replace": "background-color:#1a1a2e"
        }
      ]
    }
  ]
}
Field Description
targets Array of resource IDs inside resources.pak. Use python -m chromemod.cli unpack to explore them.
find Regex pattern matched against the resource content.
replace Replacement string. Supports ${variable} substitution from config.
config Optional key-value map for template variables in replacements.

Useful CLI commands

# Unpack all resources for inspection
python -m chromemod.cli unpack

# Apply patches from the patches/ directory
python -m chromemod.cli apply

# Restore original Chrome (undo all mods)
python -m chromemod.cli restore

⚠️ Important Notes

  • Chrome updates may overwrite resources.pak. The installer registers a Windows Scheduled Task (ChromeModAutoPatcher) that re-applies your patches automatically every hour and at each logon.
  • Admin privileges are required because resources.pak lives inside C:\Program Files\. The .cmd launchers auto-elevate via UAC.
  • Always reversible. The engine creates a .bak backup before the first patch. Run Uninstall.cmd or python -m chromemod.cli restore to get back to stock Chrome instantly.

🤝 Contributing & License

ChromeMod is released under the MIT License.

Contributions welcome — add your own mod to examples/ and open a PR.

Report a Bug · Request a Feature

About

Declarative Chrome WebUI patcher — modify New Tab Page and internal chrome:// pages using JSON manifests.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages