diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-02-28 18:32:39 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-02-28 18:32:39 +0100 |
| commit | 406d857c61fb128a48281a52899ddf77b68201be (patch) | |
| tree | 67fcdb30109ba1317c4971bbf9d04443966e4fed /client | |
| parent | ef90adeb4230ac27c18d3ed9e2cfab000c8689e0 (diff) | |
threejs splash page on the index
Diffstat (limited to 'client')
| -rw-r--r-- | client/splash/index.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/client/splash/index.js b/client/splash/index.js index e247b7f5..a21110f0 100644 --- a/client/splash/index.js +++ b/client/splash/index.js @@ -31,12 +31,14 @@ function build() { function bind() { document.querySelector('.slogan').addEventListener('click', modal.close) - toArray(document.querySelectorAll('.aboutLink')).forEach(el => { - el.addEventListener('click', modal.toggle) - }) - document.querySelector('.about .inner').addEventListener('click', e => e.stopPropagation()) - document.querySelector('.about').addEventListener('click', modal.close) - document.querySelector('.close').addEventListener('click', modal.close) + if (document.querySelector('.about')) { + toArray(document.querySelectorAll('.aboutLink')).forEach(el => { + el.addEventListener('click', modal.toggle) + }) + document.querySelector('.about .inner').addEventListener('click', e => e.stopPropagation()) + document.querySelector('.about').addEventListener('click', modal.close) + document.querySelector('.close').addEventListener('click', modal.close) + } } function animate() { |
