Skip to content

Instantly share code, notes, and snippets.

@SagiriHimoto
Last active December 27, 2022 12:04
Show Gist options
  • Save SagiriHimoto/5d195288abef6f146be618422e8f4261 to your computer and use it in GitHub Desktop.
Save SagiriHimoto/5d195288abef6f146be618422e8f4261 to your computer and use it in GitHub Desktop.
/* Locate toy function (outputs in console log) */
function GetToyURIData(toynomber) {
const childnumber = toynomber + 2
var sourceCanvas = document.querySelector("body > modal-container > div.modal-dialog.undefined > div > toys-modal > div.modal-body > div.selection-container > div > div > div > div:nth-child("+childnumber+") > toy-canvas > canvas");
sourceImageData = sourceCanvas.toDataURL("image/png");
console.log(sourceImageData);
}
/* Put toy nomber in brackets */
/* If you are missing some toys in the list, then subtract the amount of missing toys from the toy number */
GetToyURIData()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment