mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-28 00:34:47 -04:00
Add helpers to activate and deactivate warning
This commit is contained in:
7
frontend/composables/use-navigation-warning.ts
Normal file
7
frontend/composables/use-navigation-warning.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const activateNavigationWarning = () => {
|
||||
window.onbeforeunload = () => true;
|
||||
}
|
||||
|
||||
export const deactivateNavigationWarning = () => {
|
||||
window.onbeforeunload = null;
|
||||
}
|
||||
Reference in New Issue
Block a user