()
| 169 | |
| 170 | // getting data from local storage, if present |
| 171 | function getData() { |
| 172 | for (key in localStorage['pointsDict']) { |
| 173 | if (localStorage['pointsDict'][key] !== [0, 0, 0]) { |
| 174 | pointsDict = JSON.parse(localStorage['pointsDict']); |
| 175 | return; |
| 176 | } |
| 177 | } |
| 178 | // for a new session |
| 179 | setData(); |
| 180 | } |
| 181 | getData(); |
| 182 | |
| 183 | // function(){clears rank} |