Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joesondow/48c5dda7579bbca68a63b59cefd6ed47 to your computer and use it in GitHub Desktop.
Save joesondow/48c5dda7579bbca68a63b59cefd6ed47 to your computer and use it in GitHub Desktop.
Greasemonkey script CryptexHunt.com hide team answers
// ==UserScript==
// @name CryptexHunt.com hide team answers
// @version 1
// @grant none
// @match https://hunt.cryptexhunt.com/
// ==/UserScript==
(function() {
'use strict';
var cells, i, cell;
cells = document.querySelectorAll('tr.puzzle > td');
for (i = 1; i < cells.length; i+=2) {
cell = cells[i];
if (cell.textContent.trim().length >= 1) {
cell.dataset.answer = cell.textContent.trim();
cell.textContent = '(click to reveal)';
cell.style.cursor = 'pointer';
cell.onclick = function(el) {
this.textContent = this.dataset.answer;
this.style.cursor = 'default';
this.onclick = null;
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment