Api key via web interface

This commit is contained in:
Alex
2023-02-06 23:37:18 +00:00
parent 94063649b2
commit 4bbc7ee1a0
6 changed files with 585 additions and 28 deletions

View File

@@ -0,0 +1,15 @@
function resetApiKey() {
document.getElementById('modal').classList.toggle('hidden')
}
var el2 = document.getElementById('api-key-form');
if (el2) {
el2.addEventListener("submit", function (event) {
event.preventDefault()
var apiKey = document.getElementById("api-key-input").value;
document.getElementById('modal').classList.toggle('hidden')
localStorage.setItem('apiKey', apiKey)
document.getElementById('api-key-input').value = ''
});
}