Skip to content

Commit

Permalink
Safer.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesoftwarephilosopher committed Aug 22, 2024
1 parent 51ae21a commit ba7d430
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions site/monarch/monarch-playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ async function updateTokenProvider() {
monaco.languages.setMonarchTokensProvider('typescript', mod.tokenProvider);
setupTheme(mod.rules);
}

window.onbeforeunload = (e) => {
if (!confirm('Lose progress!?')) e.preventDefault();
}

0 comments on commit ba7d430

Please sign in to comment.