hugo-battheme/\

22 lines
486 B
Text
Raw Normal View History

2022-04-16 20:01:53 +00:00
const buttons = document.getElementsByClassName("randomword-button");
export function randomizeWords() {
registerButtons();
}
function registerButtons() {
for (let button of buttons) {
button.addEventListener("click", function () {
button.innerHTML = processWordlist(button.getAttribute("data-wordlist"));
});
button.click();
}
}
// takes all the words and returns only one
function processWordlist(wordlist) {
return wordlist;
}
function stripSpaces() {}