From 7cc3f32f993146d111ada80a3d593be66ae49bf6 Mon Sep 17 00:00:00 2001 From: robert Date: Sun, 1 Feb 2009 16:42:31 +0000 Subject: [PATCH] add back/forward key events and change click handler to completely be driven by slides.js, changed code by jag --- fosdem2009/index.html | 4 +- fosdem2009/slide_expectations.html | 2 +- fosdem2009/slide_initial_goals.html | 2 +- fosdem2009/slide_introduction.html | 2 +- fosdem2009/slide_quovadis.html | 2 +- fosdem2009/slide_seamonkey1.html | 2 +- fosdem2009/slide_seamonkey2.html | 2 +- fosdem2009/slide_vision1_integration.html | 2 +- fosdem2009/slide_vision2_configurability.html | 2 +- fosdem2009/slide_vision3_innovation.html | 2 +- fosdem2009/slide_vision4_security.html | 2 +- fosdem2009/slide_vision5_stability.html | 2 +- fosdem2009/slides.js | 40 +++++++++++++++---- 13 files changed, 46 insertions(+), 20 deletions(-) diff --git a/fosdem2009/index.html b/fosdem2009/index.html index 8f55ca3..c25f60f 100755 --- a/fosdem2009/index.html +++ b/fosdem2009/index.html @@ -14,7 +14,7 @@ - + @@ -48,7 +48,7 @@ Speaker: Robert Kaiser, "KaiRo" <kairo@kairo.at>
  • Best navigated with SeaMonkey's "Site Navigation Bar" (all pages linked via [HTML 2.0] <link> tags)
  • For others: nav links on all slides, with accesskeys - (e.g. "n"/Alt+Shift+N for "next")
  • + (e.g. "n"/Alt+Shift+N for "next"), back/forward keys
  • Table of Contents
  • © 01-02/2009 Robert Kaiser and The SeaMonkey Project
  • diff --git a/fosdem2009/slide_expectations.html b/fosdem2009/slide_expectations.html index 688b3c2..aaa6741 100755 --- a/fosdem2009/slide_expectations.html +++ b/fosdem2009/slide_expectations.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_initial_goals.html b/fosdem2009/slide_initial_goals.html index dc6dae0..03ff59a 100755 --- a/fosdem2009/slide_initial_goals.html +++ b/fosdem2009/slide_initial_goals.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_introduction.html b/fosdem2009/slide_introduction.html index d2eb274..b696b70 100644 --- a/fosdem2009/slide_introduction.html +++ b/fosdem2009/slide_introduction.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_quovadis.html b/fosdem2009/slide_quovadis.html index 7684af9..9340ba8 100755 --- a/fosdem2009/slide_quovadis.html +++ b/fosdem2009/slide_quovadis.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_seamonkey1.html b/fosdem2009/slide_seamonkey1.html index 6c0b2a5..77e4395 100755 --- a/fosdem2009/slide_seamonkey1.html +++ b/fosdem2009/slide_seamonkey1.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_seamonkey2.html b/fosdem2009/slide_seamonkey2.html index a1243ed..ea69a06 100755 --- a/fosdem2009/slide_seamonkey2.html +++ b/fosdem2009/slide_seamonkey2.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_vision1_integration.html b/fosdem2009/slide_vision1_integration.html index 455afb0..1c121a1 100755 --- a/fosdem2009/slide_vision1_integration.html +++ b/fosdem2009/slide_vision1_integration.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_vision2_configurability.html b/fosdem2009/slide_vision2_configurability.html index 0d0f0c4..7f8b59a 100755 --- a/fosdem2009/slide_vision2_configurability.html +++ b/fosdem2009/slide_vision2_configurability.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_vision3_innovation.html b/fosdem2009/slide_vision3_innovation.html index c81feff..0ec7906 100755 --- a/fosdem2009/slide_vision3_innovation.html +++ b/fosdem2009/slide_vision3_innovation.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_vision4_security.html b/fosdem2009/slide_vision4_security.html index 7b83cdc..a3397de 100755 --- a/fosdem2009/slide_vision4_security.html +++ b/fosdem2009/slide_vision4_security.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slide_vision5_stability.html b/fosdem2009/slide_vision5_stability.html index c47adcb..f8c1d55 100755 --- a/fosdem2009/slide_vision5_stability.html +++ b/fosdem2009/slide_vision5_stability.html @@ -14,7 +14,7 @@ - + diff --git a/fosdem2009/slides.js b/fosdem2009/slides.js index 134b3f4..1dd7390 100644 --- a/fosdem2009/slides.js +++ b/fosdem2009/slides.js @@ -5,12 +5,6 @@ * (for FOSDEM 2007) * ******************************/ -function docClicked(event) { - if (event.target.nodeName != "A") { - location.href = document.getElementById('goNext').href; - } -} - // do timed color variantion on slides var slide_seconds = 3*60; var slide_start = new Date(); @@ -34,5 +28,37 @@ function timerFired() { setTimeout("timerFired()", 1000); } } - setTimeout("timerFired()", 1000*(slide_seconds/3)); + +(function() { + function go(where) { + where = where || "next"; + var links = document.getElementsByTagName("link"); + for (var i = 0; i < links.length; ++i) { + if (links[i].rel == where) { + window.location.href = links[i].href; + break; + } + } + } + + function handleClick(e) { + e = e || event; + var target = (window.event) ? e.srcElement : e.target; + if (e.which == 1 && target.nodeName != "A") + go("next"); + } + + function handleKeyPress(e) { + e = e || event; + switch (e.keyCode) { + case e.DOM_VK_LEFT: + go("previous"); break; + case e.DOM_VK_RIGHT: + go("next"); break; + } + } + + window.onclick = handleClick; + window.onkeypress = handleKeyPress; +})(); -- 2.43.0