How max-eee/neopass works
Project type and purpose
• This is a Chrome browser extension (“NeoPass Free”) designed to bypass exam‐portal restrictions, inject AI-powered assistance into pages, and provide a popup UI and DevTools panel for configuration.
• Purpose: intercept page events, inject helper scripts, communicate with AI providers (OpenAI, Gemini, Claude, or custom) and present answers or paste capabilities.
File structure
• Top level:
• manifest.json — Chrome extension manifest declaring scripts, UI, permissions
• contentScript.js — entry point for injection into web pages
• devtools.js — sets up a custom DevTools panel for advanced features
• popup.html / popup.js — browser toolbar UI for settings and manual triggers
• worker.js — background/service worker handling long-lived tasks and API calls
• data/ — static assets and injection modules (anti-debug, chatbot, exam bypass, etc.)
• metadata.json, nptel.txt, data/nptel.json — configuration and dataset for NPTEL integration
• Recognize the extension architecture:
• Manifest wires up background (worker.js), content scripts, popup UI, and DevTools
• Data folder modules are loaded dynamically by contentScript.js or worker.js
• Message passing via chrome.runtime and chrome.tabs APIs
README for additional insights
• Confirms multiple AI providers, free vs. Pro modes, feature set (MCQ solver, paste override, tab switch bypass).
• Encourages dynamic script injection for different portals and NPTEL data extraction.
a. Main components
1) Chrome Manifest – orchestrator
2) Background / Service Worker (worker.js) – handles:
• API key storage & crypto
• Outbound requests to AI endpoints
• Rate-limit logic
3) Content Scripts (contentScript.js + data/inject/*.js) – injected into exam pages to:
• Override prohibited actions (paste, right-click, tab switch)
• Load AI-powered chatbot overlay
• Insert logic for MCQ extraction and submission
4) Popup UI (popup.html / popup.js) – user interface for:
• Entering API key
• Choosing provider
• Testing connection
• Switching to Pro tab or login
5) DevTools Panel (devtools.js) – optional settings/debug interface in Chrome DevTools
6) Data Storage – localStorage or chrome.storage to persist API keys, user settings, nptel.json
7) External Services – AI provider endpoints (OpenAI, Google Gemini, Anthropic Claude, or custom)
b. Relationships and interactions
• Content scripts auto-injected on matching exam domains via manifest rules → they send initialization messages to worker.js.
• worker.js retrieves API key + provider from storage → makes HTTP calls to AI endpoint → returns suggestions.
• content scripts render suggestions (chatbot overlay, autotype, MCQ answers).
• For DevTools: devtools.js registers a panel → communicates with background to debug or tweak injection.
• Data folder injection modules are loaded on demand by contentScript.js based on the portal.
c. Architectural patterns & principles
• Chrome Extension MVC-like pattern:
• View layer: Popup UI + Chatbot overlay
• Controller: content scripts
• Model: background/service worker + storage + external API
• Loose coupling via message passing (chrome.runtime.sendMessage, onMessage).
• Modular injection: each data/inject script is a plugin for a specific bypass or enhancement.
d. Key technologies & libraries
• Chrome Extension APIs: runtime, tabs, storage, devtools
• Fetch API / XHR for HTTP calls
• Vanilla JS modules under data/inject
• Manifest v3 service worker (worker.js)