Skip to content
Snippets Groups Projects
Commit 2a83d200 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

correctly handle logout for key

parent 1b7d71d0
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,21 @@
})
});
// Make the remove key button work
document.querySelectorAll("a").forEach(anchor => {
anchor.addEventListener("click", e => {
try {
let url = new URL(anchor.href);
if (url.pathname == "/keys/key/remove") {
e.preventDefault(); // Prevent direct loading of page
browser.runtime.sendMessage({ type: "settings_remove", setting_key: "key" }).then(() => {
document.location.href = url;
})
}
} catch (error) { }
})
});
function submitForm(form) {
let form_action = form.action;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment