This commit is contained in:
simon 2019-10-27 14:08:40 -04:00
parent 7234c22d2f
commit 2943ca9365

View File

@ -27,12 +27,14 @@ function toggleSearchBar() {
$.jsonPost("i").then(resp => {
resp["indices"].forEach(idx => {
$("#indices").append($("<option>")
const opt = $("<option>")
.attr("value", idx.id)
.attr("selected", !idx.name.includes("(nsfw)"))
.append(idx.name)
);
selectedIndices.push(idx.id);
.append(idx.name);
if (!idx.name.includes("(nsfw)")) {
opt.attr("selected", !idx.name.includes("(nsfw)"))
selectedIndices.push(idx.id);
}
$("#indices").append(opt);
});
});