Inline Script Detector is a lightweight Chrome extension that scans the currently opened webpage and detects inline JavaScript blocks (script tags without a src attribute). It lists all detected scripts, provides inspectable logs, and identifies duplicate inline scripts based on content hashing.
This tool is suitable for any website and is useful for:
- Debugging JavaScript-heavy pages
- Detecting duplicated inline logic
- Performance and maintainability audits
- Content Security Policy (CSP) cleanup
- Analyzing third-party script injections
- Detects all inline
<script>tags on the page - Outputs results directly to the browser DevTools console
- Provides:
- Table view for quick scanning
- Inspectable object logs for deep analysis
- Duplicate script detection using hashing
- One-click execution via popup
- Compatible with Chrome Manifest V3
- CSP-safe (no inline JavaScript in extension UI)
inline-script-detector/ ├── manifest.json ├── popup.html ├── popup.js └── content.js
- Click Scan Page in the extension popup.
- The extension injects
content.jsinto the active browser tab. - The script collects all
<script>elements from the document. - Scripts without a
srcattribute are filtered. - A hash is generated for each script based on its content.
- Results are printed to the webpage’s DevTools console:
- A summary table
- Inspectable script objects
- Grouped duplicate scripts
The extension does not modify the page or execute detected scripts.
- Open Chrome and navigate to: chrome://extensions
- Enable Developer mode.
- Click Load unpacked.
- Select the
inline-script-detectorfolder. - The extension icon will appear in the toolbar.
- Open any website.
- Right-click and select Inspect.
- Open the Console tab.
- Click the extension icon.
- Click Scan Page.
- Review results in the page console.
Provides a quick overview of all inline scripts.
Logs full script objects for deep inspection.
Groups identical inline scripts using hashing.
- No external data transfer
- No network requests
- Runs only on user action
- Manifest V3 & CSP compliant
MIT License