Skip to content

Instantly share code, notes, and snippets.

@Gabrielhj17
Gabrielhj17 / jigidi-helper.js
Last active February 8, 2024 08:01 — forked from Dan-Q/jigidi-helper.js
Experimental under-development code to streamline Jigidi solving. ADDED CODE AND DESCRIPTION SO THE ORIGINAL CODE CAN BE RUN THROUGH A CHROME BOOKMARK, INSTRUCTIONS IN README
javascript:
window.jColors = ['red', 'blue', 'brown', 'orange', 'yellow', 'pink', 'lightblue', 'lightgreen', 'lightgray'];
window.lColors = ['white', 'black', 'purple', 'darkgray', '#009'];
window.lWidths = [5, 10, 20];
window.jCols = parseInt(document.getElementById('info-creator').innerText.match(/(\d+)×/)[1]);
window.jC = 0;
CanvasRenderingContext2D.prototype.putImageData = function(imageData, dx, dy){
const col = window.jC % window.jCols;
const row = Math.floor(window.jC / window.jCols);
this.fillStyle = window.jColors[col % window.jColors.length];