Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.63 KB

File metadata and controls

33 lines (24 loc) · 1.63 KB

Architecture

GridPluck is a Manifest V3 Chrome extension with two bundled entry points and no runtime dependencies.

Toolbar click
  → background service worker injects selector into the active tab
  → pointer movement resolves the nearest credible table candidate
  → parser normalizes only rows already present in the DOM
  → Shadow DOM preview renders in the top frame
  → user copies TSV/Markdown or downloads CSV/JSON locally

Detection order

  1. Semantic <table> elements, including merged cells and common split header/body wrappers
  2. Accessible grids using role="table", role="grid", or role="treegrid"
  3. Repeated sibling rows with a dominant, stable direct-child column count
  4. Flat CSS Grid containers with at least two resolved columns and two loaded rows

GridPluck deliberately rejects weak candidates instead of flattening an entire page into misleading data.

Trust boundaries

  • Page DOM and extracted cell values are untrusted input.
  • Data is inserted into the preview with textContent, never HTML.
  • CSV and TSV exports prefix common spreadsheet-formula patterns as a safeguard.
  • The UI lives in a Shadow DOM and the selection rectangle does not mutate the selected table.
  • Preview data is held in memory and is not sent to a server. Clipboard copies and downloaded files persist under the user's control.

Frame behavior

The selector is injected with allFrames. Chrome may restrict inaccessible cross-origin frames because GridPluck intentionally avoids persistent <all_urls> permission. Results selected in an accessible child frame are relayed by the service worker and rendered in the top frame.