aboutsummaryrefslogtreecommitdiff
path: root/html/samegame.html
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-13 14:05:55 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-11-13 14:05:55 +0000
commita90bb4a4ef9fac5c6185b763aa2cafba9d7c6b12 (patch)
tree7a7cc8caf1039f1685e34f32104fd89373f5a9dc /html/samegame.html
parent5a225bf585ba302dbae1eca567b2070c67ea2981 (diff)
downloadpuzzles-a90bb4a4ef9fac5c6185b763aa2cafba9d7c6b12.zip
puzzles-a90bb4a4ef9fac5c6185b763aa2cafba9d7c6b12.tar.gz
puzzles-a90bb4a4ef9fac5c6185b763aa2cafba9d7c6b12.tar.bz2
puzzles-a90bb4a4ef9fac5c6185b763aa2cafba9d7c6b12.tar.xz
js: Better handling of games without presets and/or solve
Games with neither presets nor configuration (which may only be the Null Game) have been slightly broken since the introduction of hierarchical preset menus, in that the code to remove the "Type..." menu stopped being called then. My switch to using radio buttons in menus then broke them utterly because it's not possible to set the value of an empty radio group, causing a crash at startup. Fix this by detected when there's no preset menu, removing the item from the menu bar, and setting the variable that's meant to indicate this has been done. The solve button problem was more subtle, in that only the <button> was being hidden and not the <li> containing it, which led to the right border of the menu bar being two pixels thick. Switch to fully removing the <li> from the DOM, like we now do with the presets menu, since that also makes my keyboard handler (in another branch) simpler.
Diffstat (limited to 'html/samegame.html')
0 files changed, 0 insertions, 0 deletions