Skip to content

Instantly share code, notes, and snippets.

function permutator(inputArr) {
var results = [];
function permute(arr, memo) {
var cur, memo = memo || [];
for (var i = 0; i < arr.length; i++) {
cur = arr.splice(i, 1);
if (arr.length === 0) {
results.push(memo.concat(cur));
// can be embedded into cjs or greasemonkey, or just paste directly into the console on dev-tools
// click cheat to get coordinate
// click coordinate to open external google maps pinned on the answer
// click finetune to compare your guess to the actual answer difference
let a = document.createElement('div')
a.setAttribute('style','position: absolute; left:0; top: 0; width: 500px; height: 50px; z-index: 9999')
a.innerHTML = `<p>CHEAT</p><div id="cheat-base"></div><div id="cheat-ans"></div><div class="cheat-ft">Fine Tune:</div><div class="cheat-ft" id="cheat-ft-ans">---</div>`
a.onclick = function(){
if(location.pathname.startsWith('/battle-royale/') || location.pathname.startsWith('/duels/') || location.pathname.startsWith('/game/') || location.pathname.startsWith('/challenge/')){