diff --git a/output/js/util.js b/output/js/util.js index 6aaec93..dc17f51 100644 --- a/output/js/util.js +++ b/output/js/util.js @@ -82,7 +82,11 @@ export const dom = { tbl_communities: () => document.getElementById("tbl_communities"), tbl_communities_content_rows: () => Array.from(dom.tbl_communities()?.rows)?.filter(row => !row.querySelector('th')), - community_row: (communityID) => document.querySelector(`.room-row[${ATTRIBUTES.ROW.IDENTIFIER}="${communityID}"]`), + community_row: (communityID, matchIdPrefix=false) => { + const identifier = ATTRIBUTES.ROW.IDENTIFIER; + const matches = matchIdPrefix ? '^=' : '='; + return document.querySelector(`.room-row[${identifier}${matches}"${communityID}"]`); + }, /** * @param {HTMLTableRowElement} row */