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() {}