From: Michael Stapelberg Date: Fri, 22 Jul 2011 12:35:36 +0000 (+0200) Subject: screenshots: correctly start slide show when coming via hash URL X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=884c1a7de7506664328df6b6c70e79e9676d5ed0;p=i3%2Fi3.github.io screenshots: correctly start slide show when coming via hash URL --- 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); } });