diff options
author | Yorhel <git@yorhel.nl> | 2022-07-10 07:58:09 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2022-07-10 07:58:11 +0200 |
commit | 8ca41f27dd034539918104e38c9019eacee10aef (patch) | |
tree | 11fcea0b1073ba49c9687935d5d8d3f4bb37ccf2 /lib | |
parent | c37d140ac85c55741f2e4031dac7e3513d6e1cda (diff) |
Consider tag truthiness a major spoiler
Fixes https://vndb.org/t950.1308
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNWeb/VN/Page.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm index 45a437ba..72fc852a 100644 --- a/lib/VNWeb/VN/Page.pm +++ b/lib/VNWeb/VN/Page.pm @@ -853,7 +853,7 @@ sub tags_ { li_ $lvl == 1 ? (class => 'tagvnlist-parent') : $t->{inherited} ? (class => 'tagvnlist-inherited') : (), sub { VNWeb::TT::Lib::tagscore_($t->{rating}, $t->{inherited}); b_ class => 'grayedout', '━━'x($lvl-1).' ' if $lvl > 1; - a_ href => "/$t->{id}", class => $view->{spoilers} > 0 && $t->{lie} ? 'lie' : $t->{rating} ? undef : 'parent', $t->{name}; + a_ href => "/$t->{id}", class => $view->{spoilers} > 1 && $t->{lie} ? 'lie' : $t->{rating} ? undef : 'parent', $t->{name}; spoil_ $t->{spoiler}; } if $lvl; @@ -863,7 +863,7 @@ sub tags_ { } div_ class => 'mainbox', sub { - my $max_spoil = max map $_->{spoiler}, values %tags; + my $max_spoil = max map $_->{lie}?2:$_->{spoiler}, values %tags; p_ class => 'mainopts', sub { if($max_spoil) { a_ mkclass(checked => $view->{spoilers} == 0), href => '?view='.viewset(spoilers=>0).'#tags', 'Hide spoilers'; |