Files
pbakaus_impeccable/extension/devtools/devtools.js
T
Paul BakausandClaude Opus 4.6 e961d56252 Add Chrome DevTools extension for anti-pattern detection
Adds a Manifest V3 Chrome extension that injects the detector when
DevTools opens, with a dedicated panel for browsing findings, a toolbar
popup for quick scan/toggle, and per-rule settings synced via
chrome.storage. Categorizes anti-patterns into AI slop vs quality
issues with visual differentiation (sparkle prefix, panel grouping).
Overlay labels are polished with flush positioning, cycling for
multi-finding elements, and synchronized hover darkening.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 15:18:36 -07:00

22 lines
667 B
JavaScript

/**
* Impeccable DevTools Extension - DevTools Page
*
* Creates the Impeccable panel and triggers an auto-scan when DevTools opens.
* This page lives for the entire DevTools session -- its port disconnect
* is the canonical signal that DevTools has closed.
*/
chrome.devtools.panels.create(
'Impeccable',
'icons/icon-32.png',
'devtools/panel.html'
);
// Connect a lifecycle port so the service worker knows when DevTools closes
const port = chrome.runtime.connect({
name: `impeccable-devtools-${chrome.devtools.inspectedWindow.tabId}`,
});
// Auto-scan when DevTools opens (regardless of which panel is active).
port.postMessage({ action: 'scan' });