summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-03-05 10:50:15 +0100
committerYorhel <git@yorhel.nl>2021-03-05 10:50:17 +0100
commit9c0165b293fd4cc152dc77c6a98b9cccde0deb21 (patch)
tree43f923bc93ad70b59aade6480628cb09b2febfd4
parentf4459955c17ae31b3eca4648b62c184b189457bb (diff)
Images::Lib: Don't generate hide-on-click HTML when image points to a URL
A minor optimization in generated HTML size.
-rw-r--r--lib/VNWeb/Images/Lib.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/Images/Lib.pm b/lib/VNWeb/Images/Lib.pm
index 69c4c23d..74366390 100644
--- a/lib/VNWeb/Images/Lib.pm
+++ b/lib/VNWeb/Images/Lib.pm
@@ -94,7 +94,7 @@ sub image_ {
my $sexh = $sex > $sexp && $sexp >= 0 if $img->{votecount};
my $vioh = $vio > $viop if $img->{votecount};
my $hidden = $sexp < 0 || $sexh || $vioh || (!$img->{votecount} && ($sexp < 2 || $viop < 2));
- my $hide_on_click = $sexp < 0 || $sex || $vio || !$img->{votecount};
+ my $hide_on_click = $opt{url} ? $hidden : $sexp < 0 || $sex || $vio || !$img->{votecount};
my $small = $w*$h < 20000;
label_ class => 'imghover', style => "width: ${w}px; height: ${h}px", sub {