This file contains 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 desmosPlayer | |
// @namespace http://github.com/jason-woolf | |
// @version 1.0.0 | |
// @description Program a series of graph changes to create animation | |
// @author Jason Woolf (MathyJaphy) | |
// @match https://www.desmos.com/calculator* | |
// @grant none | |
// @run-at document-idle | |
// ==/UserScript== |
This file contains 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
... | |
Calc = window.Calc; | |
// Squelch the automatic scroll-into-view behavior for programs | |
Calc.controller.origScrollItemIntoView = Calc.controller.scrollItemIntoView; | |
Calc.controller.origScrollSelectedItemIntoView = Calc.controller.scrollSelectedItemIntoView; | |
Calc.controller.scrollSelectedItemIntoView = function () { | |
const expr = this.getSelectedItem(); | |
if (expr && expr.text && isAProgram(expr.text)) { | |
// No auto scrolling for a program! |