| 
									
										
										
										
											2020-07-23 03:21:26 -04:00
										 |  |  | window.addEventListener('load', () => { | 
					
						
							|  |  |  |     const cookieNoticeShown = localStorage.getItem('cookieNotice'); | 
					
						
							|  |  |  |     if (cookieNoticeShown) { return; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const cookieNotice = document.createElement('div'); | 
					
						
							|  |  |  |     cookieNotice.innerText = "This website uses cookies to store information about the games you play."; | 
					
						
							| 
									
										
										
										
											2020-10-24 14:46:27 -04:00
										 |  |  |     cookieNotice.setAttribute('id', 'cookie-notice'); | 
					
						
							| 
									
										
										
										
											2020-12-05 15:37:31 -05:00
										 |  |  |     const closeButton = document.createElement('span'); | 
					
						
							|  |  |  |     closeButton.setAttribute('id', 'close-button'); | 
					
						
							|  |  |  |     closeButton.innerText = 'X'; | 
					
						
							|  |  |  |     cookieNotice.appendChild(closeButton); | 
					
						
							| 
									
										
										
										
											2020-07-23 03:21:26 -04:00
										 |  |  |     document.body.appendChild(cookieNotice); | 
					
						
							|  |  |  |     cookieNotice.addEventListener('click', () => { | 
					
						
							|  |  |  |         localStorage.setItem('cookieNotice', "1"); | 
					
						
							|  |  |  |         document.body.removeChild(cookieNotice); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | }); |