X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/e37bc4efe627399c7f6b851f56440fa18e3ab4dd..70ab66af5817d28dd46a338896d40f2b3fee1e21:/common.inc.plp diff --git a/common.inc.plp b/common.inc.plp index d282f09..6295de7 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -50,8 +50,6 @@ BEGIN { our $Request //= decode_utf8($ENV{PATH_INFO} =~ s{^/}{}r); our $style; -our $showkeys //= !exists $get{keys} ? undef : - ($get{keys} ne '0' && ($get{keys} || 'always')); $header{content_type} = 'text/html; charset=utf-8'; @@ -149,14 +147,13 @@ sub Html { '', ); - # optional amends - push @{ $meta->{raw} }, ( - '', - '', - !$showkeys ? '' : - $showkeys eq 'ghost' ? '' : (), - '', - ) if $meta->{keys}; + if (my $img = $meta->{image}) { + my $proto = sprintf('http%s://', !!$ENV{HTTPS} && 's'); + my $url = "$proto$ENV{HTTP_HOST}/$img"; + push @{ $meta->{raw} }, ( + qq(), + ); + } my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;