diff --git a/output/main.js b/output/main.js index 146a6b31..974d0684 100644 --- a/output/main.js +++ b/output/main.js @@ -22,16 +22,6 @@ import { // Hidden communities for transparency. const filteredCommunities = { - tests: [ - "fishing+8e2e", // Example group from PySOGS documentation - "test+118d", // Testing 1, 2, 3 - "test+13f6", // Testing room2 - "test+fe93", // 测试(Test) - "xyz+7908", // XYZ Room - "testingroom+22fd", - "TOKEN_fortest1+4567", - ], - offensive: [ "aiunlimited+fc30", // illegal material "AlexMed+e093", // drug trading? @@ -389,13 +379,20 @@ function createJoinLinkButtons() { function hideBadCommunities() { let numberOfHiddenCommunities = 0; - for (const category of ['tests', 'offensive']) { + for (const category of ['offensive']) { numberOfHiddenCommunities += filteredCommunities[category] .map(hideCommunity) .reduce((a, b) => a + b); } + for (const row of dom.tbl_communities_content_rows()) { + const rowInfo = dom.row_info(row); + if (rowInfo.tags.some((tag) => tag.text === "test")) { + numberOfHiddenCommunities += hideCommunity(rowInfo.identifier); + } + } + const summary = dom.servers_hidden(); summary.innerText = `(${numberOfHiddenCommunities} hidden)`; } diff --git a/php/servers/servers-rooms.php b/php/servers/servers-rooms.php index 241d7008..ee11067c 100644 --- a/php/servers/servers-rooms.php +++ b/php/servers/servers-rooms.php @@ -564,7 +564,7 @@ ); } - if ($this->matched_by_list($TESTING_INCLUDE)) { + if (in_array("test", $this->tags) || $this->matched_by_list($TESTING_INCLUDE)) { $derived_tags[] = new CommunityTag( "test",