1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Refactor WebAuthn Javascript code

This commit is contained in:
Frédéric Guillot 2023-11-06 17:28:25 +00:00
parent a75256bed5
commit 2b8342fcd5
9 changed files with 226 additions and 218 deletions

View file

@ -688,4 +688,13 @@ function checkShareAPI(title, url) {
console.error(err);
window.location.reload();
}
}
}
function getCsrfToken() {
let element = document.querySelector("body[data-csrf-token]");
if (element !== null) {
return element.dataset.csrfToken;
}
return "";
}