Poltergeist: I made a browser extension that haunts the page you’re reading

The intersection of artificial intelligence, web development, and interactive art has yielded a novel creation: Poltergeist, a Chrome Manifest V3 browser extension designed to simulate a mischievous spirit inhabiting active web pages. Developed by software engineer Andrew David as a submission for the Hacktoberfest Open-Source AI Challenge Week 4 under the theme "Ghost in the Machine," the application combines modern web APIs, open-weight language models, and high-performance text-to-speech generation to deliver a contextual digital haunting.
Conceptualization and Core Mechanics
Poltergeist operates on a deceptively simple user premise. Upon navigating to any standard web page, the user clicks a designated action button labeled "Possess this page." At that moment, a visual entity materialized purely through Cascading Style Sheets (CSS) and inline Scalable Vector Graphics (SVG)—devoid of external image assets—appears on the screen.
The extension immediately initiates a background scraping sequence, harvesting the active page’s title, structural headings, and an approximate 1,500-character excerpt of visible text. This data is fed into an open-weight artificial intelligence model configured via a specialized system prompt: "You are a mischievous ghost haunting this web page." The model processes the textual context and generates a brief, eerie, yet humorous observation tailored specifically to the content currently displayed on the user’s screen.

This observation is then rendered via a typewriter effect in a floating speech bubble adjacent to the digital apparition, while simultaneously being voiced aloud using ElevenLabs text-to-speech technology. Beyond simple commentary, the extension introduces dynamic page interactions, including headline mutations, screen flickering, flashlight dimming effects, a custom cursor follower, and an embedded ghost-hunt mini-game.
Technical Architecture and Open-Source Infrastructure
Built entirely on vanilla JavaScript without the use of heavy build steps or complex framework overhead, Poltergeist prioritizes lightweight performance and structural transparency. The "brain" powering the haunting is the gpt-oss-120b model—an open-weight, MIT-licensed architecture made accessible through Groq’s high-speed inference service.
The underlying architecture relies on a clear separation of concerns between the Chrome extension’s background service worker, content scripts injected into the active DOM, and the external inference API. Data privacy was a primary architectural consideration during development. To protect sensitive user data, form inputs, password fields, and payment gateways are strictly excluded from the page-text extraction pipeline. Furthermore, third-party voice synthesis providers receive only the newly generated commentary string, ensuring that private or proprietary page content is never transmitted externally.
The Significance of Open Innovation
A critical aspect of the Poltergeist project lies in its alignment with open-source advocacy and open-weight AI development. By utilizing an open model rather than a proprietary black-box system, the developer retained the flexibility to swap underlying model providers—migrating dynamically from local Ollama instances to cloud-hosted Groq endpoints—without requiring structural rewrites of the core application.

This open-access framework eliminates vendor lock-in and allows users to run, inspect, and modify the software without purchasing commercial API subscriptions or exposing personal credentials. Industry analysts note that projects like Poltergeist highlight the feasibility of decentralized, community-driven AI applications that empower individual developers to build complex, multi-modal systems locally and transparently.
Broader Industry Implications and Future Outlook
As browser extensions increasingly incorporate generative artificial intelligence, tools such as Poltergeist serve as both creative experiments and stress-tests for modern web security and privacy standards. By demonstrating how open-weight models can parse Document Object Model (DOM) trees in real-time to generate context-aware interactive layers, the project points toward a future where web browsing is augmented by dynamic, localized synthetic entities.
The successful integration of lightweight SVG graphics, robust privacy filters, and rapid open-source inference models establishes a technical blueprint for developers seeking to merge humor, artificial intelligence, and utility in web-based applications. As the open-source AI community continues to refine smaller, highly capable open-weight models, lightweight interactive agents like Poltergeist may transition from novelty hackathon entries to mainstream paradigms for ambient computing and contextual user engagement.







