Added U2F Support for YubiKey
This commit is contained in:
@ -1,13 +1,33 @@
|
||||
document.querySelectorAll(".floating>input").forEach(e => {
|
||||
function checkState() {
|
||||
if (e.value !== "") {
|
||||
if (e.classList.contains("used")) return;
|
||||
e.classList.add("used")
|
||||
} else {
|
||||
if (e.classList.contains("used")) e.classList.remove("used")
|
||||
}
|
||||
(() => {
|
||||
const run = () => {
|
||||
document.querySelectorAll(".floating>input").forEach(e => {
|
||||
function checkState() {
|
||||
if (e.value !== "") {
|
||||
if (e.classList.contains("used")) return;
|
||||
e.classList.add("used")
|
||||
} else {
|
||||
if (e.classList.contains("used")) e.classList.remove("used")
|
||||
}
|
||||
}
|
||||
|
||||
e.addEventListener("change", () => checkState())
|
||||
checkState()
|
||||
})
|
||||
}
|
||||
|
||||
e.addEventListener("change", () => checkState())
|
||||
checkState()
|
||||
})
|
||||
run();
|
||||
|
||||
var mutationObserver = new MutationObserver(() => {
|
||||
run()
|
||||
});
|
||||
|
||||
mutationObserver.observe(document.documentElement, {
|
||||
attributes: false,
|
||||
characterData: false,
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
|
||||
window.Mutt
|
||||
window.addEventListener("DOMNodeInserted", () => run())
|
||||
})();
|
2
views/shared/preact.min.js
vendored
Normal file
2
views/shared/preact.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user