Skip to content

oguzhanozcelik/inline-script-detector-chrome-extention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inline Script Detector – Chrome Extension

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

Features

  • 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)

Folder Structure

inline-script-detector/ ├── manifest.json ├── popup.html ├── popup.js └── content.js


How It Works

  1. Click Scan Page in the extension popup.
  2. The extension injects content.js into the active browser tab.
  3. The script collects all <script> elements from the document.
  4. Scripts without a src attribute are filtered.
  5. A hash is generated for each script based on its content.
  6. 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.


Installation (Chrome)

  1. Open Chrome and navigate to: chrome://extensions
  2. Enable Developer mode.
  3. Click Load unpacked.
  4. Select the inline-script-detector folder.
  5. The extension icon will appear in the toolbar.

Usage

  1. Open any website.
  2. Right-click and select Inspect.
  3. Open the Console tab.
  4. Click the extension icon.
  5. Click Scan Page.
  6. Review results in the page console.

Console Output

Inline Script Table

Provides a quick overview of all inline scripts.

Inspectable Log

Logs full script objects for deep inspection.

Duplicate Detection

Groups identical inline scripts using hashing.


Security & Privacy

  • No external data transfer
  • No network requests
  • Runs only on user action
  • Manifest V3 & CSP compliant

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors