#3809 Add beforeunload event listener to prompt user when chat is saving

6f543e860fb5216f0208f7737c78357ef929414d

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +7 -0Showing whitespace changes
public/script.js+7 -0
@@ -12209,4 +12209,11 @@ jQuery(async function () {
12209 });12209 });
1221012210
12211 initCustomSelectedSamplers();12211 initCustomSelectedSamplers();
12212
12213 window.addEventListener('beforeunload', (e) => {
12214 if (isChatSaving) {
12215 e.preventDefault();
12216 e.returnValue = true;
12217 }
12218 });
12212});12219});