More granular icon safety

parallel-fetching
gravel 2 years ago
parent f37cf7b358
commit 79db6b1b20
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -537,12 +537,11 @@ label[for=toggle-show-room-ids]::after {
transition: filter 0.15s, opacity 0.15s;
}
#details-modal-community-icon:not([data-icon-safety="1"], #details-modal-community-icon-wrapper:hover > *) {
#details-modal-community-icon:not([data-icon-safety="-1"], #details-modal-community-icon-wrapper:hover > *) {
opacity: 0.5;
filter: blur(3px);
}
#details-modal-start #details-modal-description {
max-height: 50vh;
overflow: auto;

@ -67,10 +67,12 @@
/**
* @var string[] $ICON_BLOCKLIST
* These hostnames are considered to have unsafe room icons.
* These hostnames or rooms are considered to have unsafe room icons.
*/
$ICON_BLOCKLIST = [
"gaohuangse.work"
"gaohuangse.work",
"46.101.253.18",
"womanbodybeauty+13f6"
];
$SERVER_ICON_MAPPING = [

@ -80,6 +80,9 @@
function room_icon_safety(\CommunityRoom $room): int {
global $ICON_ALLOWLIST, $ICON_BLOCKLIST;
if (in_array($room->get_room_identifier(), $ICON_BLOCKLIST)) {
return -1;
}
if (in_array($room->server->get_hostname(), $ICON_ALLOWLIST)) {
return 1;
}

Loading…
Cancel
Save