Last active
March 2, 2021 10:12
-
-
Save joesondow/48c5dda7579bbca68a63b59cefd6ed47 to your computer and use it in GitHub Desktop.
Greasemonkey script CryptexHunt.com hide team answers
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
// ==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