Skip to content

Instantly share code, notes, and snippets.

@Dan-Q
Last active December 30, 2025 15:20
Show Gist options
  • Select an option

  • Save Dan-Q/e9bfe5c2ca4b13fae4994c5e84685761 to your computer and use it in GitHub Desktop.

Select an option

Save Dan-Q/e9bfe5c2ca4b13fae4994c5e84685761 to your computer and use it in GitHub Desktop.
Experimental under-development code to streamline Jigidi solving.

Jigidi Helper (Experimental)

Replaces the image of a jigsaw puzzle with a predictable, (theoretically) easier-to-solve design.

Partially-solved jigsaw, post-tampering.

How to use

  1. Begin a Jigidi puzzle.
  2. Run the code in your browser debug console.
  3. Restart the puzzle by pressing the Restart button in the Jigidi sidebar.
  4. The puzzle will be replaced with a predictable patterned one.

How does this help?

The predictable pattern has a number of features that make it easier to solve that most other jigsaws:

  • Each piece has two numbers printed on it: the first is the row in which it belongs, the second is the column, making it possible to identify the exact location that a given piece belongs in.
  • Each column is a different colour, streamlining presorting.
  • Rows within a column alternate between lighter and darker variants ("striping").
  • Stripes of alternating thickness and a cycle of colours form long horizonal and vertical bands across the image, streamlining identification.
  • No information is sent back to the server to indicate that the puzzle has been tampered with.
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];
this.fillRect(-1000,-1000,2000,2000);
if(0 == (row % 2)){ this.fillStyle = '#ffffff33'; this.fillRect(-1000,-1000,2000,2000); }
this.fillStyle = window.lColors[row % window.lColors.length];
this.fillRect(-1000, -35, 2000, window.lWidths[row % window.lWidths.length]);
this.fillStyle = window.lColors[col % window.lColors.length];
this.fillRect(-35, -1000, window.lWidths[col % window.lWidths.length], 2000);
this.font = 'bold 14px sans-serif';
this.fillStyle = 'black';
this.fillText(`${row+1},${col+1}`, -5, 0);
window.jC++;
}
@medovy
Copy link

medovy commented Sep 7, 2024

Doesn't work for jigsaw puzzles like https://www.jigidi.com/s/*

@Willi9974
Copy link

where can i find the console code for sorting and put all on one place

@sbec67
Copy link

sbec67 commented Jan 15, 2025

Hi all,

There’s an excellent Facebook group where people share answers to solved Jigidi puzzles. It may be worth a look there before trying to solve it yourself.

https://www.facebook.com/share/g/V46nhEo91YcEc3Qw/?mibextid=K35XfP

Hi @gabrielhj17
i somehow got banned from that Group :(
i have no clue why - i tried to follow the rules - and think i did.
I tried to contact the Admin - but he also blocked me :(

@OschauLars
Copy link

OschauLars commented Dec 30, 2025

Doesn't work for jigsaw puzzles like https://www.jigidi.com/s/*

I faced a similar issue as Jigidi seems to add some code for language support. E.g. German puzzles follow links with an inserted de.

I modified the first few line to be less restrictive:

// ==UserScript==
// @name Jigidi Magic Stripes
// @namespace me.danq.com.jigidi.magicstripes
// @match https://www.jigidi.com/solve/*
// @match https://www.jigidi.com/de/solve/*
// @match https://www.jigidi.com/*
// @grant GM_getValue
// @grant GM_setValue
// @Version 1.1
// @author Dan Q https://danq.me
// @description 23/03/2023, 14:32:30
// ==/UserScript==

Now it works like charme again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment