- JavaScript 83.6%
- CSS 7.9%
- HTML 6.8%
- Python 1.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| assets | ||
| build | ||
| dist | ||
| events | ||
| modules | ||
| popup | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| index.js | ||
| LICENSE | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
AntiTestportal for Firefox · 1.5.0
A small Firefox extension with configurable Testportal page tools, question search, and optional Gemini answer suggestions. Based on ocean’s original project; the original MIT license is preserved.
- Toggle page leave detection and answer timer overrides.
- Click question text to search Google or DuckDuckGo; click images to open Google Lens.
- Save a Gemini API key in settings and enable Highlight suggested answers. Gemini’s choices receive a subtle green tint, without selecting or submitting anything.
- Uses Gemini 3.1 Flash-Lite, which supports text and image input. It sends question and answer images where readable and falls back to available text when images cannot be attached. Single-choice and multiple-choice questions are supported; free-text questions are skipped.
Install and use
- In Firefox 142+, open
about:debugging→ This Firefox → Load Temporary Add-on. - Select
build/extension/manifest.jsonorbuild/antitestportal-1.5.0.xpi. - Open the toolbar popup or the extension’s settings. Paste a key from Google AI Studio, click Save key, then enable Highlight suggested answers.
- Open a Testportal question. Gemini settings apply immediately to open pages; reload after changing the other page tools or updating the extension.
The build is unsigned. Temporary installations disappear after Firefox restarts; permanent installation in standard Firefox requires Mozilla signing.
Data and limitations
Gemini is off by default. When enabled, the current question, answer choices, and up to six readable images are sent to Google’s Gemini API using your key. The key is saved only in browser.storage.local in this Firefox profile, not synced or embedded in page scripts. Local extension storage is not an encrypted vault. Remove key deletes the saved value and disables suggestions. Google’s API quotas, charges, and data policies apply.
Images are resized when possible. Protected or cross-origin images that cannot be read are omitted, and the question status indicates this. Remote image downloads are limited to the supported Testportal/Teams domains. No screenshots of the whole page are uploaded. Suggestions can be wrong. A failed request shows a reason and a manual retry; the extension does not automatically retry quota errors. Navigating to a different question or disabling Gemini clears old highlights.
Question extraction uses .question_essence and nearby radio/checkbox choices, including accessible custom controls. Unsupported layouts are skipped. Page tools depend on Testportal’s implementation and cannot guarantee overriding server-side limits.
Build and verify
Requires Node.js 22.12+ and Python 3. Install Chromium locally or run npx playwright install chromium for browser tests.
npm ci
npm test
npm run build
npm run lint
build/extension/ is the unpacked extension. build/antitestportal-1.5.0.zip and .xpi contain identical runtime files. The build script excludes tests, dependencies, keys, and local archives. dist/ contains a historical release.
Tests cover request validation, image input and fallback, API failures, settings, DOM extraction, stale responses, and gentle highlighting using synthetic questions and mocked API responses. A live Gemini key and a live Testportal session are needed to verify model quality and the current site end to end.