From c07d635ca0f23107cfe172728caf673b0fde72f8 Mon Sep 17 00:00:00 2001 From: mohamadreza Date: Wed, 11 Sep 2024 20:07:00 +0330 Subject: [PATCH] feat(logoute): add logout btn --- script/script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/script.js b/script/script.js index d7da3bb..af7d3b4 100644 --- a/script/script.js +++ b/script/script.js @@ -352,6 +352,10 @@ elm_code.addEventListener("input", () => { } }); +elm_logout_btn.addEventListener("click", () => { + document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; +}) + window.addEventListener('load', () => { elm_code.focus();