Skip to content

Instantly share code, notes, and snippets.

@jared-hughes
Last active November 28, 2023 17:44
Show Gist options
  • Save jared-hughes/1bab5d94e2ad0ab326180a21e3f955c0 to your computer and use it in GitHub Desktop.
Save jared-hughes/1bab5d94e2ad0ab326180a21e3f955c0 to your computer and use it in GitHub Desktop.
Desmos Godmode: Increases the limit for lists to 1 million elements (from 10_000), and raises the limit for "expressions nested too deeply" from 32k to 1 million
// ==UserScript==
// @name Desmos godmode with lists
// @namespace github.com/jared-hughes
// @match *://www.desmos.com/calculator*
// @description Increase the limits on list length and "nested too deeply" error
// @grant none
// @version 1.4
// @run-at document-start
// @author jared-hughes
// ==/UserScript==
// modified from https://www.reddit.com/r/desmos/comments/mhz8mc/expression_nested_too_deeply_bypass_userscript/
window.Worker = new Proxy(Worker, {
construct(target, args) {
if (args[0].startsWith("blob:")) {
const xhr = new XMLHttpRequest
xhr.open("GET", args[0], false)
xhr.send()
const hooked = xhr.responseText
.replace(/>= ?32768/g, `>= 1e6`)
.replace(/1e4/g, `1e6`)
args[0] = URL.createObjectURL(new Blob([hooked]))
}
return new target(...args)
}
})
@billyboruton
Copy link

i think the nested too deeply fix stopped working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment