From 884c1a7de7506664328df6b6c70e79e9676d5ed0 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 22 Jul 2011 14:35:36 +0200 Subject: [PATCH] screenshots: correctly start slide show when coming via hash URL --- screenshots/index.html.mako | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/screenshots/index.html.mako b/screenshots/index.html.mako index 7dd87d9..a967cc5 100644 --- a/screenshots/index.html.mako +++ b/screenshots/index.html.mako @@ -229,16 +229,19 @@ $(document).ready(function() { masks.click(function() { endshow(false); }); - - $('.shot img').click(function() { + var showmask = function() { var winH = $(window).height(); var maskHeight = $(document).height(); var maskWidth = $(window).width(); - var full = $(this).parent().attr('href'); var mask = $('#mask'); mask.css({ 'width': maskWidth, 'height': maskHeight }).show(); + }; + $('.shot img').click(function() { + showmask(); + + var full = $(this).parent().attr('href'); var loading = $('#loading'); loading.show(); @@ -324,6 +327,7 @@ $(document).ready(function() { if (location.hash.length > 0) { var url = location.hash.substring(1); + showmask(); loadimage(url, undefined, true); } @@ -336,6 +340,7 @@ $(document).ready(function() { if (url.length === 0) { endshow(true); } else { + showmask(); loadimage(url, undefined, true); } }); -- 2.39.5