Web Potions: A Chrome Extension for AI-Driven Web Customization
Users can now restyle, clean, and automate web browsing using AI-powered scripts.
1Customizing 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.
2AI 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.
3Security 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.
4Technical 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.
5Local 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.
6Community 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.
7Advanced 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.
8Development 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.