How jraversbcn21/pixelruler works
PixelRuler is a Chrome extension for inspecting web-page layout. The main workflow is to activate measurement from the popup or keyboard shortcut, inspect hovered elements and click for details, then optionally compare spacing or copy the tooltip. The graph preserves the documented configuration and inspection capabilities. Some content-script handlers are omitted from the excerpts, so unverified runtime links are left out or marked dashed.
Main entry points: content.js Element inspector · popup.js Popup controls · background.js Shortcut handler · content.css Visual overlays
Components 14
Activation and settings
- Popup controls
popup.js - Shortcut handler
background.js - Extension config
manifest.json - Saved preferences
popup.js
Page inspection
- Element inspector
content.js - Visual overlays
content.css - Element details
content.js - Box model
content.js - Distance geometry
measure.js - Distance display
content.js - Tooltip and copy
content.js
Chrome platform
- Chrome APIs
Other components
- User
- Web page
Connections 18
- User → Popup controls: opens
README.md - User → Shortcut handler: presses shortcut
README.md - Popup controls → Chrome APIs: queries active tab
popup.js - Popup controls → Saved preferences: loads and saves
popup.js - Element inspector → Saved preferences: loads preferences
content.js - Popup controls → Element inspector: activates or injects
popup.js - Popup controls → Visual overlays: injects styles
popup.js - Shortcut handler → Chrome APIs: queries active tab
background.js - Shortcut handler → Element inspector: toggles or injects
background.js - Shortcut handler → Visual overlays: injects styles
background.js - Web page → Element inspector: provides elements
README.md - Element inspector → Element details: reads dimensions and typography
README.md - Element inspector → Box model: reads spacing
content.js - Element inspector → Visual overlays: renders highlights
content.js - Element inspector → Distance geometry: requests gap segments
- Element inspector → Distance display: renders measurements
content.js - Element inspector → Tooltip and copy: shows details and copies
README.md - Extension config → Chrome APIs: configures extension