mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-09 01:09:54 +00:00
fixes and dynamic prompts
This commit is contained in:
@@ -54,6 +54,18 @@ function make(tag, ...classes) {
|
||||
return el;
|
||||
}
|
||||
|
||||
function fillSelect($select, options, callback) {
|
||||
$select.innerHTML = "";
|
||||
|
||||
for (const option of options) {
|
||||
const el = document.createElement("option");
|
||||
|
||||
callback(el, option);
|
||||
|
||||
$select.appendChild(el);
|
||||
}
|
||||
}
|
||||
|
||||
function escapeHtml(text) {
|
||||
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
|
Reference in New Issue
Block a user