ich habe gerade nochmal die static js angeschaut und gesehen das var test nur auf success=true getestet wird. also kein status=ok das bezieht sich wohl nur auf update session.
Spoiler anzeigen
Code
success: function(info) {
if( info.success === true ) {
$("#" + key + "-auth-code-request").prop("hidden", true);
$("#" + key + "-auth-code-input").prop("disabled", false);
$("#" + key + "-submit-code").prop("hidden", false);
$("#" + key + "-submit-code").prop("disabled", false);
$("#" + key + "-account-message-text").text("The code has been requested!");
$("#" + key + "-account-message").slideDown(500).prop("style", "margin-top: 3px; opacity: 1; color: #00aa00;");
globalThis.verifyCode = info.token;
} else {
$("#" + key + "-account-message-text").text(info.message);
$("#" + key + "-account-message").slideDown(500).prop("style", "margin-top: 3px; opacity: 1; color: red;");
}
},
error: function() {
$("#" + key + "-account-message-text").text("Failed to retrieve API status");
$("#" + key + "-account-message").slideDown(500).prop("style", "margin-top: 3px; opacity: 1; color: red;");
}
Alles anzeigen
damit sind wir auf der sicheren seite. werde ich mal mein uralt script updaten.