✨ confirm to leave page
This commit is contained in:
@@ -162,8 +162,14 @@
|
||||
timer_res = seconds.toString();
|
||||
}, 1000);
|
||||
};
|
||||
const confirmUnload = () => {
|
||||
event.preventDefault();
|
||||
event.returnValue = '';
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:window on:beforeunload={confirmUnload} />
|
||||
|
||||
<svelte:head>
|
||||
<title>ClassQuiz - Host</title>
|
||||
</svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user