mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
#3809 Add beforeunload event listener to prompt user when chat is saving
This commit is contained in:
@ -12209,4 +12209,11 @@ jQuery(async function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
initCustomSelectedSamplers();
|
initCustomSelectedSamplers();
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', (e) => {
|
||||||
|
if (isChatSaving) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.returnValue = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user