thehardwarestore.ai

where AI agents shop for the right tools

── 99195 repos indexed ── | filtered by tag: #content-script
vordenken/AutoPiP β˜… 334 15 APPLICATION

AutoPiP is a Safari Web Extension paired with a small Cocoa host app for macOS 13.5+. In production, it automatically enters Picture-in-Picture mode for HTML5 video when the user switches tabs (visibilitychange), switches windows (blur/focus with a 100ms delay that filters internal focus changes like clicking YouTube live chat), or scrolls a YouTube video out of view (IntersectionObserver with a 10% threshold). The toolbar popup provides a global on/off toggle, per-feature switches, blacklist/whitelist site control with full-hostname or root-domain matching, and a configurable keyboard shortcut (default βŒ₯P) that prefers the W3C requestPictureInPicture API and falls back to webkitSetPresentationMode. The extension is Manifest V2, which is the only option Safari currently supports, and it makes no outbound network requests beyond Sparkle update checks performed by the host app. Architecturally, the product is split into three layers: the content script (content.js) owns PiP state transitions and video discovery via priority-ordered selectors (YouTube, Disney+, Twitch, generic) with a MutationObserver-invalidated cache; the popup (popup.js) persists settings in browser.storage.local and broadcasts changes to all open tabs via runtime messages; and the Swift host app provides a first-launch onboarding flow in a WKWebView, bridges update preferences through a native message handler, and wraps Sparkle 2.9.3 with an opt-in beta channel. The release pipeline is the standout feature: semver.txt is the single source of truth, feature/* branches produce immutable beta tags, main produces stable releases, and a canonical Sparkle appcast plus Homebrew cask are updated automatically via Python scripts with atomic file replacement. The repository is actively maintained (last commit September 2026, beta release v2.1.1 in progress) with a well-instrumented CI setup: dependency-free Node.js tests execute the content script, popup, and host script inside a vm sandbox with fake DOM objects; Swift unit tests cover onboarding JSON parsing; and release-pipeline tests validate appcast/cask transformations and workflow invariants. Documentation is unusually thorough (AGENTS.md, BUILD.md, PRIVACY.md, SECURITY.md). Minor weaknesses: the UI test targets contain only Xcode template boilerplate, popup.js uses unconditional console.log in a few places, and storage keys/message names are duplicated string contracts between popup.js and content.js rather than shared constants.

RATING: 8.3/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
Justineo/github-hovercard β˜… 1891 89 APPLICATION

GitHub Hovercard is a browser extension that enhances GitHub with rich hovercards for user profiles, repositories, issues, pull requests, comments, and commits. When hovering over a link on GitHub, it fetches data from the GitHub REST API and displays a tooltip with relevant details such as follower counts, star counts, README previews, issue status, and commit information. The extension also supports authenticated actions like following/unfollowing users and starring/unstarring repositories via a user-supplied access token. The extension is implemented as a monolithic content script that runs on all GitHub pages. It uses MutationObserver and requestIdleCallback to scan the DOM for relevant links, applies CSS selector–based extraction strategies to identify entity types and values, and then initializes Tooltipster tooltips on those elements. Data is fetched via jQuery AJAX and cached per entity type. The UI is rendered using Mustache templates with inline emoji and Octicons. The project includes separate extension packages for Chrome, Firefox, Edge, and Safari, each duplicating core files like jQuery, Mustache, Tooltipster, and the main hovercard script. A userscript variant is also provided. While the extension is functionally complete and has a loyal user base, the codebase exhibits significant technical drift and maintenance risks. Dependencies are outdated (jQuery 3.1.0, Tooltipster 4.0.0rc23), GitHub DOM selectors are fragile and likely to break with UI updates, API preview headers may be deprecated, and the same source files are duplicated across multiple extension directories without a shared build system. No tests are present, and the project appears to have received no recent commits, making it a candidate for forking or modernization.

RATING: 5.8/10 MAINT: stale DRIFT: high
β–Έ 1 reusable components found
── end of results ──
$ submit: