warn user of potential save file wipe

This commit is contained in:
CrafterPika 2026-06-27 21:21:29 +02:00
commit 7358c34063
No known key found for this signature in database
GPG key ID: 68B3920DBA3C6C31

View file

@ -114,6 +114,13 @@ function populateEquipment() {
sendToCSharp("AllEquipment");
}
function warnUser() {
if (!sessionStorage.getItem("warnShown")) {
alert("DO NOT USE ANY OF THESE BEFORE THE TITLE SCREEN LOADED OR YOU WILL WIPE YOUR SAVE FILE YOU HAVE BEEN WARNED!!!");
sessionStorage.setItem('warnShown', 'true');
}
}
window.external.receiveMessage(message => {
// console.log(message)
if (message.startsWith("Cemu Base:")) {
@ -266,7 +273,10 @@ function openTab(evt, tabName) {
if (tabName === 'Tab6') {
keepStatsUpdated = true;
updateStatsPage();
} else if (tabName == 'Tab8') {
warnUser()
} else if (tabName == 'Tab9') {
warnUser()
populateEquipment()
} else {
keepStatsUpdated = false;