Adds invision script to prompt before reloading

This commit is contained in:
Jonathan Hodgson 2019-02-21 14:14:27 +00:00
parent 5b07244d63
commit f1acaa40dd

View file

@ -0,0 +1,7 @@
window.addEventListener( "beforeunload", (event)=>{
// Cancel the event as stated by the standard.
event.preventDefault();
// Chrome requires returnValue to be set.
event.returnValue = 'This is invision, not the site. Are you sure?';
return 'This is invision, not the site. Are you sure?';
} );