Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
feat(logoute): add logout btn
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadreza1388 committed Sep 11, 2024
1 parent 04dd26d commit c07d635
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit c07d635

Please sign in to comment.