$ show mourner/bullshit.js
This is a small, well-crafted JavaScript bookmarklet that scans webpage text for common business buzzwords and replaces them with the word 'bullshit' highlighted in red. The code is minimal and elegant: a comprehensive regex dictionary of terms (src/terms.js) and a clever replacement function (src/replace.js) that intelligently handles pluralization, verb forms, and case sensitivity. It uses the `findandreplacedomtext` library for safe DOM text replacement and is built with esbuild into a single minified bundle. The project is a humorous critique of corporate jargon but also a practical, reusable tool. The architecture is a classic client-side bookmarklet pattern: a single script injected into any page. It is well-maintained, with a clean build pipeline, linting, and GitHub Actions CI. The code demonstrates high craftsmanship in its simplicity and effectiveness.
The LLM identified 2 files worth highlighting for reuse:
A large, well-organized JavaScript array of regex patterns that match thousands of business buzzwords and phrases. This is a reusable data asset that can be extracted and used in other projects (e.g., a linter, a browser extension, or a text analysis tool) with minimal modification. The patterns are carefully crafted to handle variations like inflection, pluralization, and common suffixes, making it a high-quality, non-trivial dictionary.
The core logic that finds matched buzzwords in the DOM and replaces them with the word 'bullshit', preserving grammatical form (plural, past tense, -ing, etc.). The `revealBullshit` function demonstrates a non-obvious pattern for inflection-aware replacement without external NLP libraries. This module is self-contained, imports only the terms list, and could be extracted into a reusable text transformation utility for any project that needs to censor or highlight specific words with proper pluralization and tense handling.