A powerful Chrome extension that automatically detects open-source libraries and their licenses on web pages, helping developers identify potential license compatibility issues before they become legal problems.
Developer License Detector scans web pages to identify JavaScript libraries, CSS frameworks, and other open-source components, then analyzes their licenses for compatibility with your project's license. This helps developers:
- Prevent License Violations: Identify incompatible licenses before integrating code
- Ensure Compliance: Stay compliant with open-source licensing requirements
- Save Time: Automatically detect libraries without manual inspection
- Make Informed Decisions: Understand licensing implications of your dependencies
- Script Tag Analysis: Detects libraries from
<script>tags with URL pattern matching. - Main-World Global Object Detection: Identifies libraries through their global JavaScript objects (e.g.
React,Vue,jQuery) by dynamically injecting a query script into the page execution context (Main World), bypassing Chrome's isolated world sandbox restrictions. - Link Tag Analysis: Detects CSS frameworks and stylesheet dependencies.
- Font Library Detection: Identifies web font services (Google Fonts, Adobe Typekit, etc.).
- SPDX Compliance: Uses official standardized SPDX identifiers.
- Compatibility Checking: Compares page dependencies against your target license (MIT, Apache 2.0, GPL, LGPL, BSD, MPL, ISC, etc.).
- Automatic Version Normalization: Normalizes common license abbreviations to standard SPDX format keys.
- Risk Assessment: Color-codes compliance into Compatible (Low Risk), Review Required (Medium Risk), and Incompatible (High Risk).
- Detailed Explanations: Provides plain-English legal explanations and recommendations.
- Glassmorphic Dark-Mode Design: Premium Dark Mode aesthetics built with modern HSL variables and Outfit/JetBrains Mono typography.
- Slide-in Settings Overlay: Slide-in settings panel to configure target project license and scan preferences directly inside the popup.
- Toast Notifications: Interactive toast alerts displaying confirmation logs (e.g., report exports, settings toggles).
- A11y (Accessibility) Compliant: Modern focus outline styling (
:focus-visible) for keyboard navigation. - Automatic Sekme Injection: Fallback scripting injection dynamically loads content scripts if a tab is opened before the extension was loaded.
- Storage Pruning Policy: Automatically limits cached analysis results to the 50 most recent websites to prevent local storage bloat.
- 100% Client-Side: All checks are run locally within your browser sandbox. No user data leaves your device.
- Download or clone this repository:
git clone https://github.com/mustafaer/developer-license-detector.git
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in the top right)
- Click "Load unpacked"
- Select the
build/packagedirectory (if built) or the root project folder. - The extension icon will appear in your toolbar.
To compile, validate JSON schemas, and bundle a package:
# Make the build script executable
chmod +x build.sh
# Build unpacked package & zip distribution
./build.sh --dev
# Or using npm
npm run build:devThe packaged extension will be placed in build/package/ (unpacked extension source) and build/dist/ (packaged ZIP file ready for Chrome Web Store).
- Auto-Scan & Injection Phase: On page load, if "Auto-scan" is enabled, content scripts scan elements. If the script isn't loaded when you open the popup, the extension dynamically injects it.
- Main World Query: The content script injects a script into the page DOM to check the true
windowobject properties and dispatches a CustomEvent with results. - SPDX Matching & Extraction: Resolves signatures in
data/known-libraries.jsonor parses inline comments using fuzzy fingerprint matches inutils/license-matcher.js. - Compatibility Check: Background worker compares dependencies against the project license matrix.
- Pruning: Storage history is pruned to keep records limited to 50 hostnames.
- Node.js (version 14 or higher)
- Chrome Browser (version 88 or higher)
developer-license-detector/
βββ analyzers/ # License compatibility analyzer matrix
βββ background/ # Ephemeral background service worker
βββ content/ # Isolated content scripts
βββ data/ # License datasets & known libraries JSON
βββ detectors/ # Script/Global/Font detector modules
βββ icons/ # Custom logo assets (16/32/48/128 px)
βββ popup/ # User interface (HTML, CSS, JS)
βββ test/ # Zero-dependency Unit Test Suite
βββ utils/ # License normalizer & helper utilities
The project includes a Node.js unit testing suite that mocks Chrome and fetch APIs locally, verifying extraction patterns and matrices. Run them with:
npm test- Firefox and Safari cross-browser support
- Scanning package.json & lock files for Node.js project folders
- Exporting compliance reports in PDF and CSV format
- Direct GitHub / GitLab PR integration
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: mustafaerpro@gmail.com
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Made with β€οΈ by Mustafa ER