forked from tildeverse/tilde.chat
Make badges for channels show which channel they are for
This commit is contained in:
parent
32b362d928
commit
e243111436
@ -6,7 +6,7 @@
|
||||
$stats = json_decode(file_get_contents("https://tilde.chat/stats.json")) ?? array("channels"=>[]);
|
||||
foreach ($stats->channels as $key=>$channel) {
|
||||
if ($channel->name==$channel_name) {
|
||||
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.channels[$key].usercount&suffix=%20online";
|
||||
return "https://img.shields.io/badge/dynamic/json.svg?url=https://tilde.chat/stats.json&label=~chat&query=$.channels[$key].usercount&suffix=%20online%20on%20{$channel_name}";
|
||||
}
|
||||
}
|
||||
return "https://img.shields.io/badge/~chat-invalid%20channel-red.svg";
|
||||
|
Loading…
Reference in New Issue
Block a user