()
| 2104 | } |
| 2105 | |
| 2106 | async function loadSourceOptions() { |
| 2107 | if (state.sourceOptionsLoaded) return; |
| 2108 | const data = await api("/api/source-options"); |
| 2109 | state.sourceOptions = data; |
| 2110 | renderChoiceList("arxivCategories", data.arxiv_categories || [], { defaultChecked: "all" }); |
| 2111 | renderChoiceList("conferenceSources", data.conferences || [], { defaultChecked: "none" }); |
| 2112 | renderChoiceList("journalSources", data.journals || [], { defaultChecked: "none" }); |
| 2113 | state.sourceOptionsLoaded = true; |
| 2114 | } |
| 2115 | |
| 2116 | function selectedSourceValues(id) { |
| 2117 | return Array.from($(id).querySelectorAll("input:checked")).map((input) => input.value); |
no test coverage detected