# Web Potions: A Chrome Extension for AI-Driven Web Customization

Users can now restyle, clean, and automate web browsing using AI-powered scripts.

- **Source:** [Hacker News: Show HN](https://news.ycombinator.com)
- **Published:** 2026-11-07
- **Topic:** [technology](https://brifing.si/c/technology)
- **Original article:** <https://github.com/leofritsch/web-potions>
- **On Brifing:** https://brifing.si/s/5ded481f-99cd-4d6e-b35b-f42a4309465c

## Customizing the Browsing Experience

Web Potions is a new Chrome extension designed to give users control over website interfaces. It allows individuals to remove unwanted pop-ups, restyle ugly elements, and highlight specific content. By creating small bundles of code called potions, users can apply persistent changes to any website they visit frequently during their daily browsing.

## AI Integration for Automation

The tool supports AI-driven automation, allowing assistants like Claude to analyze and fix web pages automatically. The AI can identify stuck banners or broken scrolling, apply a fix, and save the result as a potion. This hands-free approach enables users to clean up complex websites without manually configuring every single interface element.

## Security and Safety Mechanisms

To prevent malicious scripts, the AI mode requires a specific keyboard shortcut, Ctrl+Alt+Shift+P, to unlock a tab. This action cannot be faked by standard page scripts, ensuring that AI-generated changes are intentional. Every AI-saved potion is clearly tagged, and users can easily undo any changes if a site tricks the AI.

## Technical Implementation Details

The extension utilizes Chrome's userScripts API to inject code at the start of page loading, ensuring hidden elements never flash on screen. CSS changes are applied via constructed stylesheets, while keyword highlighting uses the CSS Highlight API. The entire interface runs inside a shadow root, preventing interference from the host website's own scripts.

## Local Storage and Privacy

Web Potions operates entirely locally within the browser, requiring no servers, accounts, or external analytics. All user-created potions are stored in Chrome's local storage and remain private unless exported by the user. The only data fetched from the internet is a plain catalog file used to populate the extension's ready-made potion library.

## Community Sharing and Catalog

Users can share their custom potions as JSON files or via pull requests to the project repository. The extension includes a built-in catalog where users can browse and install community-made potions with a single click. This collaborative approach allows users to benefit from shared solutions for common website design frustrations and annoyances.

## Advanced Scripting Capabilities

For power users, the extension supports custom JavaScript and CSS injection. Scripts run in an isolated world and can utilize a helper object to wait for specific elements to load or execute loops. Users can also choose to run scripts in the page's own context to interact directly with the site's variables.

## Development and Compatibility

The extension is compatible with Chrome 135 and newer versions. Developers can test changes locally using a provided HTTP server and mock environments. The project is open-source under the MIT license, encouraging transparency and community contributions to the codebase, which includes various scripts for building catalogs and managing internal extension assets.

## Sources covering this story

- https://github.com/leofritsch/web-potions — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
