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