Skip to content

Instantly share code, notes, and snippets.

View mitchemmc's full-sized avatar

Mitchell McCaffrey mitchemmc

View GitHub Profile
@mitchemmc
mitchemmc / _obr-dice-test.js
Last active May 10, 2022 07:43
Roll the dice in Owlbear Rodeo every 5 seconds and output the results to a text file
// Query the reroll and result DOM nodes
const reroll = document.querySelector(".css-cn6g20-IconButton")
const result = document.querySelector(".css-cdb02n")
const results = []
const numRolls = 2000; // Number of rolls to make
let i = 0;
// Run a timer every 5 seconds that saves the previous roll and
// rolls the dice again
const interval = setInterval(() => {