Exam integrity monitoring in one script tag.
Detect tab switching, focus loss, copy/paste, fullscreen exits, second screens, DevTools, inactivity and AI-agent text inserts on any online exam — without webcams, browser extensions, or per-student fees. Events report to your server, not a vendor cloud.
- <7 KB
- gzipped, 0 dependencies
- 15
- integrity signals
- $0
- MIT, commercial OK
- 0
- installs for students
<script src="/js/tinyproctor.min.js" data-tinyproctor data-endpoint="https://your-site.com/collect.php" data-exam-id="FINAL_2026" data-attempt-id="ATTEMPT_1001"> </script> // That's the entire integration. // Tab switches, copy/paste, DevTools, idle time // are scored, batched and POSTed to your endpoint.
- Switch tabs, copy some text or right-click. Each event shows up here.
Try it: switch tabs, copy some text or right-click. No endpoint is set on this page, so nothing leaves your browser.
What's new in v1.1
A drop-in upgrade: same script tag, same payload. Two v1.0 scoring bugs are fixed, a session now lasts the whole attempt, and four new signals look for second screens, automation and AI-agent text.
| What they do | v1.0 | v1.1 |
|---|---|---|
| Click from one answer to the next | −5 each time, as focus loss | No penalty |
| Go to the next quiz page | Logged as a tab switch; score restarts at 100 | One session and one score per attempt |
| Leave the tab for 4 minutes | −15, duration unknown | −15, plus awayMs: 240000 |
No false penalties
- Moving between answer fields is no longer counted as focus loss.
- Reloading or going to the next page is no longer a tab switch.
- Bundled imports no longer start with default settings.
One session per attempt
- Session, score and unsent events carry across quiz pages.
- Every event has a
seq: exact dedupe, visible gaps. - Time away is measured, not guessed.
Screens, bots and AI-agent text
A whole answer appearing in one go is the pattern agent browsers leave. The length is recorded, never the text.
Sturdier, easier to wire up
data-format="text"skips CORS preflight.- Batches stay under 48 KiB;
fetchLater()backs them up in Chrome and Edge. - TypeScript types and an ESM entry.
Upgrading from v1.0: replace tinyproctor.min.js. New payload fields are additive (schemaVersion stays 1). Need scores comparable with v1.0? Set the four new weights to 0 in data-weights.
The whole system, on one sheet
No vendor cloud in the loop. The script watches the exam page, scores what it sees, and ships the evidence to an endpoint you own.
- Embed
One script tag
Auto-initializes from data-attributes. No build step, no framework, no install.
- Monitor
Passive listeners
Visibility, focus, fullscreen, clipboard, input, screens, activity. Never camera, mic, or contents.
- Score
Weighted locally
Configurable weights produce a live 0–100 score for instant triage.
- Report
Batched to you
sendBeacon / keepalive fetch with retry + backoff. Survives page close and page changes. Offline-tolerant.
Set up in the next five minutes
Two steps however you work: get the file, add the tag. Most people just hand step one and two to their AI agent.
Ask your AI agent
Using Claude, Copilot, Cursor or any coding agent? Paste this prompt — it handles the file, the tag, and the collector endpoint for your stack.
Works with any agent that can read URLs — the docs are agent-readable at /llms.txt.
Grab the file
The library is a single static file — download it straight into your project, then add the script tag from the hero above.
Then add the script tag from the manual path — that's the whole client-side integration.
Copy the tag
Already have the file hosted? Drop the tag on the exam page and point it at your collector. That's the full client-side integration.
Collector in 30 lines: copy-paste PHP or Node examples from the docs.
Fifteen signals, one integrity score
Every signal is individually configurable and weighted. The score gives reviewers instant triage; the event timeline gives them evidence.
Tab switching
Detects when the exam tab is hidden or the browser is minimized, and reports how long the candidate was away.
Focus loss
Flags clicks into other apps and windows — the classic second-screen tell. Moving between answer fields doesn't count.
Fullscreen exits
Enforce fullscreen at start, get an event the moment a candidate leaves it.
Copy / cut / paste
Detects clipboard use anywhere on the page — and can block it outright.
Drag-and-drop text New
Text dragged into an answer box skips paste events, so drops are counted too. File uploads are ignored.
Bulk text insert New
A whole answer appearing in one go: the trace AI agent browsers and auto-typers leave. Records the length, never the text.
Right-click
Context-menu detection with an optional hard block.
Print attempts
Catches Ctrl/Cmd+P and the browser's print dialog.
DevTools heuristics
Key-combo and window-resize heuristics flag console snooping and docked side panels, now also at exam start. Best-effort by design.
Idle + heartbeat
Inactivity detection plus a 30s heartbeat so dropped sessions stand out server-side.
Second screen New
Flags an extended display at start or when one is plugged in. Chrome and Edge, no permission prompt.
Browser automation New
Flags WebDriver-controlled browsers via navigator.webdriver. A weak signal: it can be spoofed, so its absence proves nothing.
What lands on your server
Events arrive as JSON batches with a session envelope. Your collector stores them however you like — it's one endpoint, in any stack.
Survives page close and page changes
navigator.sendBeacon()on exit,fetch(keepalive)otherwise. Unsent events are saved per tab and sent from the next quiz page.Retries on its own, dedupes exactly
Failed batches are re-queued with exponential backoff. Every event carries a
seq: dedupe on(sessionId, seq), and a gap means something never arrived.Fits the stack you already run
Copy-paste PHP + SQLite and Node.js collectors in the docs. Drops into Moodle, WordPress (LearnDash, Tutor LMS, Quiz Maker) and custom platforms.
{
"kind": "batch",
"sessionId": "tp_18f3a...",
"examId": "FINAL_2026_06",
"attemptId": "ATTEMPT_12345",
"candidateLabel": "student_42",
"screen": { "w": 1920, "h": 1080 },
"events": [
{
"seq": 42,
"clientTime": "2026-06-12T10:29:58.512Z",
"eventType": "visibility",
"violationKey": "tab_hidden",
"hasFocus": false,
"violationCount": 3,
"integrityScore": 75
},
{
"seq": 43,
"eventType": "visibility",
"eventData": { "awayMs": 241380 }
}
]
}
Why teams pick it over proctoring vendors
For low/medium-stakes assessments, webcam proctoring is often disproportionate — and per-student pricing punishes scale.
Private by architecture
No recordings, no vendor cloud, no third-party processors. The script and the data live on your infrastructure — which makes GDPR and FERPA conversations dramatically simpler.
Zero exam-day friction
Students need a normal browser and nothing else. No extension installs, no lockdown-browser support tickets, works on Chromebooks, tablets and phones.
Free at any scale
MIT-licensed and free for commercial use. 50 students or 50,000 — the price is the same: zero.
Head-to-head comparisons
See the full comparison matrixWhat it deliberately doesn't do
Honest scope beats inflated promises. Client-side signals are indicators for human review — not proof, and not prevention.
No surveillance
No camera, no microphone, no screen recording, no keystroke logging, no clipboard contents. Events describe that something happened, never what was typed or copied.
No false security
A technically skilled candidate can disable any in-page script. tinyproctor.js deters casual misuse and produces an audit trail — for high-stakes certification, layer it with stronger controls.
Questions teams ask first
Short answers here. The docs go deeper.
Does it work on mobile?
Yes — visibility, focus, clipboard, idle, and heartbeat signals all work on mobile browsers. Fullscreen and DevTools signals are desktop-oriented.
Will it slow the exam page down?
No. It's under 7 KB gzipped, dependency-free, uses passive event listeners and batched network calls (one small POST every ~0.9s at most).
What happens if the network drops?
Events queue locally (up to queueMax) and retry with exponential backoff. On page close, the queue is flushed via sendBeacon, which browsers deliver even during unload. With an attempt ID, unsent events are also saved per tab and sent from the next page.
Does it work with multi-page quizzes?
Yes. Put the same tag with the same data-attempt-id on every page: v1.1 keeps one session and one score per attempt, and moving to the next page is not a tab switch. Call TinyProctor.destroy(true) after submit.
Does it catch AI agents?
Partly. Agent browsers tend to type a whole answer at once (insert_burst), WebDriver automation announces itself (automation_flag), and docked AI sidebars trip the side-panel heuristic. A careful agent can avoid all three, and an AI on another device is invisible to any browser script, so treat these as reasons to review, not verdicts.
Can candidates fake a perfect score?
A sufficiently technical candidate can — this is true of every client-side tool. Use heartbeat gaps and missing-session detection server-side to flag tampering: a session with no events at all is itself a red flag.
Is it really free?
Yes — MIT licensed, free for commercial use. If it saves you a vendor contract, consider buying me a coffee to support maintenance.
Free forever. Fueled by coffee.
tinyproctor.js is MIT-licensed and saves teams real vendor budget. If it saved yours, a coffee keeps maintenance, docs, and new signals coming.
Tanzir Rahman is fueling open-source code, local utilities, and late-night builds.