Spaces:
Sleeping
Sleeping
Update templates/app.html
Browse files- templates/app.html +13 -0
templates/app.html
CHANGED
|
@@ -32,6 +32,19 @@
|
|
| 32 |
const supabaseUrl = "{{ supa.url }}"
|
| 33 |
const supabasePublicKey = "{{ supa.public_key }}" // public key lol
|
| 34 |
const supabase = Supabase.createClient(supabaseUrl, supabasePublicKey)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
function checkForMessage(payload) { // I don't trust you losers with something like message data, You just get to check with an api lmao
|
| 37 |
return;
|
|
|
|
| 32 |
const supabaseUrl = "{{ supa.url }}"
|
| 33 |
const supabasePublicKey = "{{ supa.public_key }}" // public key lol
|
| 34 |
const supabase = Supabase.createClient(supabaseUrl, supabasePublicKey)
|
| 35 |
+
|
| 36 |
+
document.addEventListener("DOMContentLoaded",(event) => {
|
| 37 |
+
|
| 38 |
+
document.addEventListener("keydown", (event) => {
|
| 39 |
+
if (event.key == "Enter") {
|
| 40 |
+
let input = document.getElementById("inputText");
|
| 41 |
+
if (input.value == "") {
|
| 42 |
+
return;
|
| 43 |
+
}
|
| 44 |
+
sendMessage(input.value);
|
| 45 |
+
}
|
| 46 |
+
})
|
| 47 |
+
})
|
| 48 |
|
| 49 |
function checkForMessage(payload) { // I don't trust you losers with something like message data, You just get to check with an api lmao
|
| 50 |
return;
|