Mercurial Hosting > chat
comparison src/site.js @ 20:dade6a560494
add dialogs
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 04 Nov 2024 21:37:58 -0700 |
parents | 2c63b10781e1 |
children | 7b339b1ccd11 |
comparison
equal
deleted
inserted
replaced
19:435f474f07c7 | 20:dade6a560494 |
---|---|
72 function logout() { | 72 function logout() { |
73 document.cookie = 'user=; Max-Age=0; path=/;'; | 73 document.cookie = 'user=; Max-Age=0; path=/;'; |
74 document.cookie = 'password=; Max-Age=0; path=/;'; | 74 document.cookie = 'password=; Max-Age=0; path=/;'; |
75 location = '/'; | 75 location = '/'; |
76 } | 76 } |
77 | |
78 function openModal(dialog) { | |
79 //dialog.close(); | |
80 dialog.showModal(); | |
81 //dialog.scrollTop = 0; | |
82 } | |
83 | |
84 function getEnclosingDialog(el) { | |
85 while( el.nodeName !== 'DIALOG' ) | |
86 el = el.parentNode; | |
87 return el; | |
88 } | |
89 | |
90 function closeModal(el) { | |
91 getEnclosingDialog(el).close(); | |
92 } |