From b9426877cfe30b74d03ec756b93bd047c402d7ad Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 25 Nov 2018 18:44:06 +0100 Subject: we have site --- docs/js/shards.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/js/shards.js') diff --git a/docs/js/shards.js b/docs/js/shards.js index 44d2ecd..6512e70 100644 --- a/docs/js/shards.js +++ b/docs/js/shards.js @@ -16,7 +16,10 @@ const shards = (function(){ bg_el.classList.remove('fade') } function bind(){ - document.querySelector('h1').addEventListener('click', rebuild) + document.querySelector('h1').addEventListener('click', () => { + sounds.play('click') + rebuild() + }) } function build(){ count = choice([5,7,7,11,11,13,13]) @@ -36,7 +39,7 @@ const shards = (function(){ function rebuild(){ if (rebuilding) return rebuilding = true - sounds.play('click') + // sounds.play('click') stars.rebuild() next() t = 0 @@ -48,7 +51,7 @@ const shards = (function(){ setTimeout(next, 20) bg_el.classList.remove('fade') rebuilding = false - sounds.play('click') + // sounds.play('click') }, 500) } function append(i){ -- cgit v1.2.3-70-g09d2