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
# SETUP BEFORE RUNNING: | |
# - download and install python 3, https://www.python.org/downloads/ | |
# - In a terminal: | |
# - pip install pytest-playwright | |
# - playwright install | |
# To run: in a terminal type python3, a space, then drag and drop this file. | |
# Press return and the program will start! |
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
function mouseDown(c, f) { | |
c.addEventListener("mousedown", e => { | |
f({x: e.pageX, y: e.pageY}); | |
}); | |
c.addEventListener("touchstart", e => { | |
f({x: e.touches[0].pageX, y: e.touches[0].pageY}); | |
}); | |
} | |
function mouseMove(c, f) { | |
c.addEventListener("mousemove", e => { |
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
/* | |
CONTENTS: | |
- color converters | |
- randomness helpers | |
- Color class | |
- palette generators | |
*/ | |
// Courtesy of https://stackoverflow.com/questions/17242144/javascript-convert-hsb-hsv-color-to-rgb-accurately | |
function HSVtoRGBA(h, s, v) { |
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
// Binds events from the first midi device | |
function bindMidiHandler(myMIDIMessagehandler){ | |
var m = null; // m = MIDIAccess object for you to make calls on | |
function onsuccesscallback( access ) { | |
m = access; | |
// Things you can do with the MIDIAccess object: | |
var inputs = m.inputs; // inputs = MIDIInputMaps, you can retrieve the inputs with iterators | |
var outputs = m.outputs; // outputs = MIDIOutputMaps, you can retrieve the outputs with iterators |
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
javascript:(function(){ | |
var on_top_style = "background-color:rgba(0,0,0,.01);position:fixed;top:0px;left:0px;bottom:0px;right:0px;z-index:1290479853759;"; | |
var on_bottom_style = "background-color:rgba(0,0,0,.01);position:fixed;top:0px;left:0px;bottom:0px;right:0px;z-index:-10;"; | |
if (document.getElementById("deleteDomNodeTopOverlay")) { | |
var overlay = document.getElementById("deleteDomNodeTopOverlay"); | |
overlay.setAttribute("toggle",overlay.getAttribute("toggle")+1); | |
if (overlay.getAttribute("toggle").length%2==0) { | |
overlay.setAttribute('style', on_bottom_style); | |
} | |
return 0; |