add clearTempLocalStorage

This commit is contained in:
Simon 2023-11-09 20:07:32 +07:00
parent 92bef81e37
commit 999e86d637
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -38,6 +38,11 @@ function clearError() {
errorOut.style.display = 'none'; errorOut.style.display = 'none';
} }
function clearTempLocalStorage() {
browserType.storage.local.remove('popupApiKey');
browserType.storage.local.remove('popupFullUrl');
}
// store access details // store access details
document.getElementById('save-login').addEventListener('click', function () { document.getElementById('save-login').addEventListener('click', function () {
let url = document.getElementById('full-url').value; let url = document.getElementById('full-url').value;
@ -139,6 +144,7 @@ function toggleAutostart() {
// send ping message to TA backend // send ping message to TA backend
function pingBackend() { function pingBackend() {
clearError(); clearError();
clearTempLocalStorage();
function handleResponse() { function handleResponse() {
console.log('connection validated'); console.log('connection validated');
setStatusIcon(true); setStatusIcon(true);