Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +2 -30
templates/index.html
CHANGED
@@ -60,7 +60,7 @@
|
|
60 |
color: gray;
|
61 |
margin-top: 10px;
|
62 |
}
|
63 |
-
.confirm-button, .switch-button
|
64 |
padding: 10px 20px;
|
65 |
background-color: #ff6a00;
|
66 |
color: white;
|
@@ -69,7 +69,7 @@
|
|
69 |
cursor: pointer;
|
70 |
margin-top: 10px;
|
71 |
}
|
72 |
-
.confirm-button:hover, .switch-button:hover
|
73 |
background-color: #e65e00;
|
74 |
}
|
75 |
</style>
|
@@ -278,15 +278,6 @@
|
|
278 |
}, 10000); // 10 seconds delay
|
279 |
}, 6000);
|
280 |
}
|
281 |
-
|
282 |
-
// Add the "Refresh me" button
|
283 |
-
let refreshButton = document.createElement("button");
|
284 |
-
refreshButton.classList.add("refresh-button");
|
285 |
-
refreshButton.textContent = "Refresh Me";
|
286 |
-
refreshButton.onclick = function () {
|
287 |
-
location.reload();
|
288 |
-
};
|
289 |
-
document.body.appendChild(refreshButton);
|
290 |
} else {
|
291 |
speak("There was an error submitting your details. Please try again.");
|
292 |
let statusText = document.getElementById('statusText');
|
@@ -309,25 +300,6 @@
|
|
309 |
});
|
310 |
}
|
311 |
|
312 |
-
// Listen for "Refresh me" command
|
313 |
-
function listenForRefreshCommand() {
|
314 |
-
speak("Say 'refresh me' to refresh the page.", function () {
|
315 |
-
recognition.start();
|
316 |
-
recognition.onresult = function (event) {
|
317 |
-
let command = event.results[0][0].transcript.trim().toLowerCase();
|
318 |
-
recognition.stop();
|
319 |
-
if (command.includes("refresh me")) {
|
320 |
-
location.reload(); // Refresh the page when "refresh me" is said
|
321 |
-
} else {
|
322 |
-
listenForRefreshCommand();
|
323 |
-
}
|
324 |
-
};
|
325 |
-
});
|
326 |
-
}
|
327 |
-
|
328 |
-
// Start listening for "Refresh me"
|
329 |
-
listenForRefreshCommand();
|
330 |
-
|
331 |
window.onload = function () {
|
332 |
askLoginOrRegister();
|
333 |
};
|
|
|
60 |
color: gray;
|
61 |
margin-top: 10px;
|
62 |
}
|
63 |
+
.confirm-button, .switch-button {
|
64 |
padding: 10px 20px;
|
65 |
background-color: #ff6a00;
|
66 |
color: white;
|
|
|
69 |
cursor: pointer;
|
70 |
margin-top: 10px;
|
71 |
}
|
72 |
+
.confirm-button:hover, .switch-button:hover {
|
73 |
background-color: #e65e00;
|
74 |
}
|
75 |
</style>
|
|
|
278 |
}, 10000); // 10 seconds delay
|
279 |
}, 6000);
|
280 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
} else {
|
282 |
speak("There was an error submitting your details. Please try again.");
|
283 |
let statusText = document.getElementById('statusText');
|
|
|
300 |
});
|
301 |
}
|
302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
window.onload = function () {
|
304 |
askLoginOrRegister();
|
305 |
};
|