Just to add some more challenge, here is the Javascript code to hide or show clues reminders present on cards.
It basically adds two buttons top right of the screen that allow to switch between the two hide or show modes. Once in hide mode, new clues will disappear after a short while.
If you tried it, please post here what you thought about the experience!
If you think this code might be malicious, I'm a game developer on BGA (proof here).
To use this code, open your Javascript console once a game of Hanabi is started, then copy/paste the code from above into the command line input and execute it by pressing enter. You'll see a Hide/show button appear above your cards.
To open your Javascript console, check >this guide<.
It basically adds two buttons top right of the screen that allow to switch between the two hide or show modes. Once in hide mode, new clues will disappear after a short while.
If you tried it, please post here what you thought about the experience!
Code: Select all
gameui.hideClues = false; gameui.hideShowHandler = false; gameui.hideShowClues = function () {dojo.query('.clue').forEach(function (elmt) {dojo[dojo.style(elmt, 'visibility') == 'visible' && gameui.hideClues ? 'fadeOut' : 'fadeIn']({node: elmt}).play();});}; dojo.place('<div style="display:inline-block; position:absolute; right: 0; bottom: 0; font-size: 80%;"><a id="hideClues" href="#" class="action-button " style="margin-left: 0" onclick="return false;" id="tunnel">Hide</a> / <a id="showClues" href="#" class="action-button " style="margin-left: 0" onclick="return false;" id="tunnel">show</a> clues</div>', 'maintitlebar_content'); dojo.connect($('hideClues'), 'onclick', function () {gameui.hideClues = true; gameui.hideShowClues(); gameui.hideShowHandler = dojo.connect(gameui, 'removeClueToken', function () {window.setTimeout(gameui.hideShowClues, 2500);});}); dojo.connect($('showClues'), 'onclick', function () {gameui.hideClues = false; gameui.hideShowClues(); dojo.disconnect(gameui.hideShowHandler);});To use this code, open your Javascript console once a game of Hanabi is started, then copy/paste the code from above into the command line input and execute it by pressing enter. You'll see a Hide/show button appear above your cards.
To open your Javascript console, check >this guide<.