A Chrome extension that displays HTML elements' data attributes when hovering over them. Perfect for developers and testers who need to inspect data attributes without using developer tools.
- Hover over any HTML element to view all its data attributes (data-*)
- Clearly formatted tooltip display with attribute names and values
- Works on any website
- Lightweight with minimal performance impact
- Automatically adjusts tooltip position to stay within viewport
- Clone this repository
- Run
npm installto install dependencies - Run
npm run buildto build the extension - Load the extension in Chrome:
- Go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
dist/srcdirectory
- Go to
- Download the latest
span-data-hoverchecker.zipfrom the Releases section - Unzip the file
- In Chrome, go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the unzipped directory
- After installing the extension, navigate to any webpage
- Hover over HTML elements to see their data attributes
- The tooltip will show all data-* attributes with their names and values
- Example: Hovering over
<span data-id="123" data-name="example">Text</span>will display both the data-id and data-name attributes
This extension uses a custom build process to:
- Generate multiple icon sizes from a source icon
- Update the manifest to reference the correct icons
- Create a zip file for distribution
npm run build- Clean the dist directory, copy files, generate icons, update manifest, and create zipnpm run clean- Remove dist directory and create new structurenpm run copy-files- Copy source files to dist/srcnpm run generate-icons- Generate multiple icon sizesnpm run update-manifest- Update manifest.json to reference all iconsnpm run zip- Create zip file in dist directory
span-data-hoverchecker/
├── dist/ # Build output directory
│ ├── span-data-hoverchecker.zip # ZIP file for distribution
│ └── src/ # Compiled extension files
├── scripts/ # Build scripts
│ ├── generate-icons.js # Generates multiple icon sizes
│ └── update-manifest.js # Updates manifest.json
├── src/ # Source files
│ ├── background.js # Background script
│ ├── content.js # Content script
│ ├── icons/ # Icon source files
│ ├── manifest.json # Extension manifest
│ ├── popup.html # Popup HTML
│ └── styles.css # Styles for content script
└── package.json # Project configuration