summaryrefslogtreecommitdiffstats
path: root/themes/lv2/static/js/slideshow.js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/lv2/static/js/slideshow.js')
-rw-r--r--themes/lv2/static/js/slideshow.js17
1 files changed, 1 insertions, 16 deletions
diff --git a/themes/lv2/static/js/slideshow.js b/themes/lv2/static/js/slideshow.js
index d9fb9c5..e50991c 100644
--- a/themes/lv2/static/js/slideshow.js
+++ b/themes/lv2/static/js/slideshow.js
@@ -1,23 +1,8 @@
-function getPreviousNode(n) {
- var p = n.previousSibling;
- while (p && p.nodeType !== 1) {
- p = p.previousSibling;
- }
- return p;
-}
-
function startSlideShow() {
var slideshow = document.getElementById("slideshow"),
imgs = slideshow.getElementsByTagName("img"),
n = imgs.length,
- m = Math.floor((Math.random() * n)),
- pred = getPreviousNode(slideshow);
-
- // Shrink width of predecessor so gallery fits beside it
- if (pred) {
- pred.style.width = "50%";
- pred.style.display = "inline-block";
- }
+ m = Math.floor((Math.random() * n));
// Start transition of initial image
imgs[m].className = "fadein";