game-of-death

antagonistic game of life  https://xi.github.io/game-of-death/
git clone https://git.ce9e.org/game-of-death.git

commit
4a08c1d131e899f59f5949a73b125306a8a5ceea
parent
157c0baeea3b4dd016f355ee15f32058e123ef75
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-01-16 06:14
make back buttons regular links

otherwise it might redirect to the previous scenario instead of the
start page

Diffstat

M src/index.js 4 ----
M src/template.js 4 ++--

2 files changed, 2 insertions, 6 deletions


diff --git a/src/index.js b/src/index.js

@@ -144,10 +144,6 @@ on('click', '.js-export', function(state) {
  144   144     download.remove();
  145   145 });
  146   146 
  147    -1 on('click', '.js-quit', function() {
  148    -1     history.back();
  149    -1 });
  150    -1 
  151   147 const onNavigate = function() {
  152   148     var path = location.hash.substr(2).split('/');
  153   149     if (path[0] === 'sandbox') {

diff --git a/src/template.js b/src/template.js

@@ -49,7 +49,7 @@ const renderControls = function(state) {
   49    49             ' ',
   50    50             h('button', {'class': 'js-export'}, 'Export'),
   51    51             ' ',
   52    -1             h('button', {'class': 'js-quit'}, 'Back'),
   -1    52             h('a', {'class': 'btn', 'href': '#!'}, 'Back'),
   53    53         ]);
   54    54     } else {
   55    55         return h('div', {'class': 'board-controls'}, [
@@ -69,7 +69,7 @@ const renderControls = function(state) {
   69    69             ' ',
   70    70             h('button', {'class': 'js-restart'}, 'Restart'),
   71    71             ' ',
   72    -1             h('button', {'class': 'js-quit'}, 'Back'),
   -1    72             h('a', {'class': 'btn', 'href': '#!'}, 'Back'),
   73    73         ]);
   74    74     }
   75    75 };