Game edition ok, and other minor tweaks

This commit is contained in:
Claude Brisson
2024-01-19 05:43:07 +01:00
parent 897246c7a6
commit cffa4ce699
9 changed files with 131 additions and 14 deletions

View File

@@ -120,8 +120,14 @@ Element.prototype.hide = function() {
return this;
}
NodeList.prototype.text = function(txt) {
this.item(0).text(txt);
return this;
if (typeof(txt) === 'undefined') {
return this.item(0).text();
} else {
this.forEach(elem => {
elem.text(txt);
});
return this;
}
}
Element.prototype.text = function(txt) {
if (typeof(txt) === 'undefined') {