| 1122 | return container; |
| 1123 | } |
| 1124 | function createOptionsInput(name, defaultValue, callback) { |
| 1125 | const container = document.createElement("div"); |
| 1126 | container.innerHTML = ` |
| 1127 | <div class="setting-row"> |
| 1128 | <label class="col description">${name}</label> |
| 1129 | <div class="col action"> |
| 1130 | <input |
| 1131 | id="popup-lyrics-delay-input" |
| 1132 | type="number" |
| 1133 | /> |
| 1134 | </div> |
| 1135 | </div>`; |
| 1136 | |
| 1137 | const input = container.querySelector("#popup-lyrics-delay-input"); |
| 1138 | input.value = defaultValue; |
| 1139 | input.onchange = (e) => { |
| 1140 | callback(e.target.value); |
| 1141 | }; |
| 1142 | |
| 1143 | return container; |
| 1144 | } |
| 1145 | // if name is null, the element can be used without a description. |
| 1146 | function createButton(name, defaultValue, callback) { |
| 1147 | let container; |