Cleanup
This commit is contained in:
		
							parent
							
								
									14f1267c5a
								
							
						
					
					
						commit
						460d689c4c
					
				|  | @ -1,6 +1,8 @@ | ||||||
| function notify(title, body) { | function notify(title, body) { | ||||||
|     if (!'Notification' in window || typeof(Notification) === 'undefined') { |   if (!"Notification" in window || typeof Notification === "undefined") { | ||||||
|         console.log(`This browser does not support desktop notification, cannot send following message: ${title} ${body}`); |     console.log( | ||||||
|  |       `This browser does not support desktop notification, cannot send following message: ${title} ${body}` | ||||||
|  |     ); | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -9,14 +11,14 @@ function notify(title, body) { | ||||||
|   } else { |   } else { | ||||||
|     let options = { |     let options = { | ||||||
|       body: body, |       body: body, | ||||||
|             icon: '/img/lufi196.png' |       icon: "/img/lufi196.png", | ||||||
|     }; |     }; | ||||||
|         let n = new Notification(title, options); |     new Notification(title, options); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| document.addEventListener('DOMContentLoaded', function () { | document.addEventListener("DOMContentLoaded", function () { | ||||||
|     if (!'Notification' in window || typeof(Notification) === 'undefined') { |   if (!"Notification" in window || typeof Notification === "undefined") { | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Booteille
						Booteille