Clean up a little bit more

This commit is contained in:
David Hummel 2021-12-21 18:48:12 -07:00
parent 1d9a0f0353
commit a6bff83c90
1 changed files with 8 additions and 8 deletions

View File

@ -93,15 +93,15 @@ sub picz_js_a_element {
my $zoom = (uc($params{config}->{image_format}) eq "SVG") ? (4 / 3) : 1; my $zoom = (uc($params{config}->{image_format}) eq "SVG") ? (4 / 3) : 1;
my $width = ceil($params{width} * $zoom); my $js = sprintf "javascript:void(window.open('%s/%s%s','','width=%d,height=%d,scrollbars=0,resizable=0'))",
my $height = ceil($params{height} * $zoom + 0.5); $params{config}->{url},
$params{config}->{imgs_dir},
$params{IMGz},
ceil($params{width} * $zoom),
ceil($params{height} * $zoom + 0.5);
return sprintf '<a href="javascript:void(window.open(\'%s/%s%s\',\'\',\'width=%d,height=%d,scrollbars=0,resizable=0\'))">%s</a>', return sprintf '<a href="%s">%s</a>',
$params{config}->{url}, $js,
$params{config}->{imgs_dir},
$params{IMGz},
$width,
$height,
img_element(%params); img_element(%params);
} }