Created
April 13, 2026 04:36
-
-
Save kamezz/88c4c7269bee0687c488345019482aa5 to your computer and use it in GitHub Desktop.
canvas bypass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name canvas | |
| // @namespace Violentmonkey Scripts | |
| // @match https://*.instructure.com/courses/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author - | |
| // @description 4/12/2026, 8:56:45 PM | |
| // ==/UserScript== | |
| // Debug log to confirm the injected script actually runs in page context | |
| console.log("✅ Canvas Guard injected into page context"); | |
| // Your visibility override logic | |
| Object.defineProperty(document, 'visibilityState', {value: 'visible', writable: true}); | |
| Object.defineProperty(document, 'hidden', {value: false, writable: true}); | |
| Object.defineProperty(document, 'webkitVisibilityState', {value: 'visible', writable: true}); | |
| Object.defineProperty(document, 'webkitHidden', {value: false, writable: true}); | |
| Window.prototype.realEventListener = Window.prototype.addEventListener; | |
| Window.prototype.addEventListener = function(a, b, c) { | |
| if (a === "focus" || a === "blur" || a === "visibilitychange") { | |
| console.log(`[AD] '${a}' event subscription prevented.`); | |
| } else { | |
| realEventListener.call(this, a, b, c); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment