Created
July 19, 2014 18:00
-
-
Save mdeboer/8854a2b48093c999fff8 to your computer and use it in GitHub Desktop.
X-Rite Hue color test cheat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cheat(rowindex) { | |
var patches = document.querySelectorAll('.drag_container div[id^=patch_'+rowindex+'_]'); | |
patches = Array.prototype.slice.call(patches); | |
patches.sort(function(a,b) { | |
var indexA = parseInt(a.id.substr(8)); | |
var indexB = parseInt(b.id.substr(8)); | |
if(indexA < indexB) { | |
return -1; | |
} | |
else if(indexA > indexB) { | |
return 1; | |
} | |
else { | |
return 0; | |
} | |
}); | |
var row = document.querySelector('#draggable_row_container_'+rowindex); | |
while(row.firstChild) { | |
row.removeChild(row.firstChild); | |
} | |
for(var i = 0; i < patches.length; i++) { | |
row.appendChild(patches[i]); | |
} | |
} | |
for(var r = 1; r < 5; r++) { | |
cheat(r); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment