Skip to content

Commit

Permalink
Make it easier to click options. (#4138)
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman authored Jan 10, 2025
1 parent 467b5f7 commit 1874295
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/common/runtime/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,17 +633,21 @@ void (async () => {
return select;
};

for (const [optionName, info] of Object.entries(optionsInfos)) {
Object.entries(optionsInfos).forEach(([optionName, info], i) => {
const id = `option${i}`;
const input =
typeof optionValues[optionName] === 'boolean'
? createCheckbox(optionName)
: createSelect(optionName, info);
input.attr('id', id);
$('<tr>')
.append($('<td>').append(input))
.append($('<td>').text(camelCaseToSnakeCase(optionName)))
.append(
$('<td>').append($('<label>').attr('for', id).text(camelCaseToSnakeCase(optionName)))
)
.append($('<td>').text(info.description))
.appendTo(optionsElem);
}
});
};
addOptionsToPage(options, kStandaloneOptionsInfos);

Expand Down

0 comments on commit 1874295

Please sign in to comment.