2
0

Remove Enter input from settings, instead update all settings on click of "Update" Button.

resolves #38
This commit is contained in:
glax 2023-07-30 17:27:47 +02:00
parent 1afa3df316
commit 98ec0b837f

View File

@ -70,13 +70,6 @@ createDownloadChapterTaskButton.addEventListener("click", () => {
OpenDownloadChapterTaskPopup();
});
publicationTaskStart.addEventListener("click", () => StartTaskClick());
settingApiUri.addEventListener("keypress", (event) => {
if(event.key === "Enter"){
apiUri = settingApiUri.value;
setTimeout(() => GetSettingsClick(), 100);
document.cookie = `apiUri=${apiUri};`;
}
});
searchPublicationQuery.addEventListener("keypress", (event) => {
if(event.key === "Enter"){
NewSearch();
@ -352,6 +345,11 @@ function UpdateLibrarySettings(){
if(settingLunaseaWebhook.value != ""){
UpdateLunaSea(settingLunaseaWebhook.value);
}
if(settingApiUri.value != ""){
apiUri = settingApiUri.value;
document.cookie = `apiUri=${apiUri};`;
}
setTimeout(() => GetSettingsClick(), 200);
}