class WordFinder extends WordQuiz {
- namehtml(name) {
- let aliases = name.split('/');
- let html = aliases.shift();
- html = html.replace(/\((.+)\)/, '<small>$1</small>');
- for (let alias of aliases) {
- html += ` <small>(${alias})</small>`;
- }
- return html;
- }
-
add(catitem, rows) {
rows.forEach(word => {
if (!word) return;
}
if (word.title) {
put(figitem, 'figcaption', {
- innerHTML: this.namehtml(word.title),
+ innerHTML: word.html,
});
}
if (this.preset.debug) {