diff --git a/static/webui/script.js b/static/webui/script.js index 21a135e6..fd0811d6 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -1147,10 +1147,7 @@ function doImport() { } function doChangeSupportedSyndicate() { - const uniqueName = - [...document.querySelectorAll("#datalist-Syndicates option")] - .find(option => option.value === document.getElementById("changeSyndicate").value) - ?.getAttribute("data-key") || ""; + const uniqueName = getKey(document.getElementById("changeSyndicate")); revalidateAuthz(() => { $.get("/api/setSupportedSyndicate.php?" + window.authz + "&syndicate=" + uniqueName).done(function () {