Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use 20x20 references

  • Loading branch information...
commit ee7e212c55ce74619f4b0ff2f7ee6fcc4da34f26 1 parent badc82e
@mocoso authored
Showing with 52 additions and 54 deletions.
  1. +51 −0 2020.js
  2. +1 −1  benefits/benefits.md
  3. +0 −53 pechakucha.js
View
51 2020.js
@@ -0,0 +1,51 @@
+var twentyTwentySetUp = false;
+var twentyTwentyRunning = false;
+
+function setUpTwentyTwenty()
+{
+ if (twentyTwentySetUp) { return; }
+
+ twentyTwentySetUp = true;
+
+ $("#slideInfo").after('<span id="twentyTwentyInfo"></span>');
+
+ $(document).keydown(function(event) {
+ var key = event.keyCode;
+
+ if (event.ctrlKey || event.altKey || event.metaKey) { return; }
+
+ // p to automatically move to the next slide every twenty seconds
+ if (key == 80)
+ {
+ twentyTwenty();
+ }
+ });
+}
+
+// For a 20x20 talk
+//
+// Will go to the next slide every 20 seconds
+function twentyTwenty()
+{
+ if (!twentyTwentyRunning) {
+ twentyTwentyRunning = true
+ $("#twentyTwentyInfo").text(twentyTwentyStatus(0));
+ var seconds = 0;
+ setInterval(function() {
+ seconds++;
+ $("#twentyTwentyInfo").text(twentyTwentyStatus(seconds));
+ if (seconds == 20) {
+ seconds = 0;
+ nextStep();
+ }
+ }, 1000);
+ }
+}
+
+function twentyTwentyStatus(seconds) {
+ return ' - 20x20 mode (' + (20 - seconds) + 's)';
+}
+
+$(function(){
+ setUpTwentyTwenty();
+});
View
2  benefits/benefits.md
@@ -45,7 +45,7 @@ Image courtesy of [Simbolism](http://www.flickr.com/people/simbolism/)
# Customisable #
@@@ javascript
- function pechaKucha()
+ function twentyTwenty()
{
setInterval(function() {
nextStep();
View
53 pechakucha.js
@@ -1,53 +0,0 @@
-var pechaKuchaSetUp = false;
-var pechaKuchaRunning = false;
-
-function setUpPechaKucha()
-{
- if (pechaKuchaSetUp) { return; }
-
- pechaKuchaSetUp = true;
-
- $("#slideInfo").after('<span id="pechaKuchaInfo"></span>');
-
- $(document).keydown(function(event) {
- var key = event.keyCode;
-
- if (event.ctrlKey || event.altKey || event.metaKey) { return; }
-
- // p for a pecha-kucha 20x20 talk http://www.pecha-kucha.org/
- if (key == 80)
- {
- pechaKucha();
- }
- });
-}
-
-// For a pecha-kucha 20x20 talk
-//
-// Will go to the next slide every 20 seconds
-//
-// See http://www.pecha-kucha.org/ for more details
-function pechaKucha()
-{
- if (!pechaKuchaRunning) {
- pechaKuchaRunning = true
- $("#pechaKuchaInfo").text(pechaKuchaStatus(0));
- var seconds = 0;
- setInterval(function() {
- seconds++;
- $("#pechaKuchaInfo").text(pechaKuchaStatus(seconds));
- if (seconds == 20) {
- seconds = 0;
- nextStep();
- }
- }, 1000);
- }
-}
-
-function pechaKuchaStatus(seconds) {
- return ' - 20x20 mode (' + (20 - seconds) + 's)';
-}
-
-$(function(){
- setUpPechaKucha();
-});
Please sign in to comment.
Something went wrong with that request. Please try again.