mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2025-12-14 18:45:06 +00:00
Update blocked page with command line to unblock
This commit is contained in:
9
src/site/html/static/js/user_available_waiter.js
Normal file
9
src/site/html/static/js/user_available_waiter.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const data = document.getElementById("data")
|
||||
const username = data.getAttribute("data-username")
|
||||
const source = new EventSource(`/api/user_available_stream/v1/${username}`)
|
||||
source.addEventListener("open", () => {
|
||||
console.log("Connected to profile waiter stream")
|
||||
})
|
||||
source.addEventListener("profile_available", () => {
|
||||
window.location.reload()
|
||||
})
|
||||
Reference in New Issue
Block a user