Mercurial Hosting > chat
comparison src/chat.js @ 95:63bcf137e693 default tip
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 23 May 2025 12:04:39 -0600 |
parents | d0566cc4a2ac |
children |
comparison
equal
deleted
inserted
replaced
94:8c3b56bb0c83 | 95:63bcf137e693 |
---|---|
235 | 235 |
236 let currentPulldown = null; | 236 let currentPulldown = null; |
237 let newPulldown = null; | 237 let newPulldown = null; |
238 | 238 |
239 function clickMenu(clicked,display) { | 239 function clickMenu(clicked,display) { |
240 //console.log("clickMenu"); | 240 //console.log('clickMenu'); |
241 let pulldown = clicked.parentNode.querySelector('div'); | 241 let pulldown = clicked.parentNode.querySelector('div'); |
242 if( pulldown !== currentPulldown ) { | 242 if( pulldown !== currentPulldown ) { |
243 pulldown.style.display = display || "block"; | 243 pulldown.style.display = display || 'block'; |
244 newPulldown = pulldown; | 244 newPulldown = pulldown; |
245 window.onclick = function() { | 245 window.onclick = function() { |
246 //console.log("window.onclick"); | 246 //console.log('window.onclick'); |
247 if( currentPulldown ) { | 247 if( currentPulldown ) { |
248 currentPulldown.style.display = "none"; | 248 currentPulldown.style.display = 'none'; |
249 if( !newPulldown ) | 249 if( !newPulldown ) |
250 window.onclick = null; | 250 window.onclick = null; |
251 } | 251 } |
252 currentPulldown = newPulldown; | 252 currentPulldown = newPulldown; |
253 newPulldown = null; | 253 newPulldown = null; |