Blocks page visibility / unload tracking on the target page only
This Tampermonkey userscript prevents Class.com from detecting when you switch away from the meeting tab. It forces the browser to report that the page is always visible, even when you are on another tab or window.
The script intercepts visibility API calls and property access, making Class believe you are continuously viewing the page. This includes:
document.visibilityState to always return "visible"document.hidden to always return falsewindow.visibilityState to always return "visible"window.hidden to always return falsedocument.hasFocus() to always return trueInstall Tampermonkey extension for your browser:
Create a new script in Tampermonkey
Copy the entire contents of script file and paste it into the editor
Save (Ctrl+S)
The script will activate automatically on Class.com pages
When you navigate away from the Class tab:
visibilitychange event, and document.visibilityState becomes "hidden"visibilityState = "visible"The script activates on:
*.upc.blackboard.com/**.upc.class.com/*The match patterns use wildcards, which means the script will likely affect other Class.com subdomains and variants beyond those explicitly listed. If you have other Class instances running on different domains or subdomains, this script may interfere with their visibility detection as well.
It will not affect non-Class websites.
The script uses Object.defineProperty to replace native browser APIs at the prototype level, intercepting all read operations. Event listeners that trigger on visibility changes are also intercepted and discarded.
All operations are wrapped in try-catch blocks to ensure the script does not break if Class makes API changes.
This script is provided for educational purposes. Use it responsibly and in accordance with your institution's policies regarding academic integrity.