From 999e86d637fd5a20d2567a7c45d2c6497c1763b9 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 9 Nov 2023 20:07:32 +0700 Subject: [PATCH] add clearTempLocalStorage --- extension/popup.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extension/popup.js b/extension/popup.js index e886849..cde91ac 100644 --- a/extension/popup.js +++ b/extension/popup.js @@ -38,6 +38,11 @@ function clearError() { errorOut.style.display = 'none'; } +function clearTempLocalStorage() { + browserType.storage.local.remove('popupApiKey'); + browserType.storage.local.remove('popupFullUrl'); +} + // store access details document.getElementById('save-login').addEventListener('click', function () { let url = document.getElementById('full-url').value; @@ -139,6 +144,7 @@ function toggleAutostart() { // send ping message to TA backend function pingBackend() { clearError(); + clearTempLocalStorage(); function handleResponse() { console.log('connection validated'); setStatusIcon(true);