mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
16 lines
492 B
JavaScript
16 lines
492 B
JavaScript
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 = ''
|
|
});
|
|
}
|