Mercurial Hosting > chat
comparison src/chat.js @ 104:46418395c860 default tip
add mute chat
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 14 Jul 2025 00:49:11 -0600 |
parents | 63bcf137e693 |
children |
comparison
equal
deleted
inserted
replaced
103:3ea9783cee39 | 104:46418395c860 |
---|---|
169 div.outerHTML = html; | 169 div.outerHTML = html; |
170 fixPosts(); | 170 fixPosts(); |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 function openMute() { | |
175 ajax(`open_mute.js?chat=${currentChatId}`); | |
176 } | |
177 | |
178 function doOpenMute(muted) { | |
179 let dialog = document.querySelector('dialog[mute]'); | |
180 let checkbox = dialog.querySelector('input'); | |
181 checkbox.checked = muted; | |
182 openModal(dialog); | |
183 } | |
184 | |
185 function saveMute(el) { | |
186 let muted = document.querySelector('dialog[mute] input').checked; | |
187 closeModal(el); | |
188 ajax(`save_mute.js?chat=${currentChatId}&muted=${muted}`); | |
189 } | |
190 | |
174 function active() { | 191 function active() { |
175 let url = 'active.js'; | 192 let url = 'active.js'; |
176 if( currentChatId ) | 193 if( currentChatId ) |
177 url += `?chat=${currentChatId}`; | 194 url += `?chat=${currentChatId}`; |
178 ajax(url); | 195 ajax(url); |