From beedbd555302b546c91f5bf3d1ccb94baafc2916 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:20:45 -0400 Subject: [PATCH] bug fikksez 3 --- mods/a_mod_by_alice.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 90a39c49..fcebd31f 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -43515,10 +43515,10 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa if((typeof(ctx) == "object") && (ctx?.constructor?.name == "CanvasRenderingContext2D")) { return }; if((typeof(ctx) == "undefined") || (typeof(ctx) == "object" && ctx === null)) { var canvases = document.getElementsByTagName("canvas"); - if(canvases.length == 0) { return } else { console.log(canvases) }; + if(canvases.length == 0) { return }; canvas = canvases[0]; - if(typeof(canvas?.getRenderingContext) == "function") { ctx = logAndReturn(canvas.getRenderingContext("2d")) } else { console.log(canvas); return }; - clearInterval(canvasGetterInterval) + if(typeof(canvas?.getContext) == "function") { ctx = canvas.getContext("2d") } else { return }; + if(!!ctx) { clearInterval(canvasGetterInterval) } } else { return }