From 6f1ae41fb448ccc0d8226237b5ac8d4b613a93ca Mon Sep 17 00:00:00 2001 From: Kalaneee Date: Mon, 10 Dec 2018 21:05:46 +0100 Subject: [PATCH] Add debug method upper in code --- public/client.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/public/client.js b/public/client.js index becdf35..42e63ba 100644 --- a/public/client.js +++ b/public/client.js @@ -18,6 +18,12 @@ var gameModes = { 850: 'Co-op vs. AI (Intermediate)' }; +/* Debug button to reset localstorage */ +document.querySelector('.debug').addEventListener('click', () => { + console.log('CLEAR LOCALSTORAGE'); + localStorage.clear(); +}); + var req = new XMLHttpRequest(); var url = '/api'; var params = 'playerName=Kalane'; @@ -297,11 +303,4 @@ function displayContent(stringData) { li.appendChild(container); matchesList.appendChild(li); }); -} - - -/* Debug button to reset localstorage */ -document.querySelector('.debug').addEventListener('click', () => { - console.log('CLEAR LOCALSTORAGE'); - localStorage.clear(); -}); \ No newline at end of file +} \ No newline at end of file