fa20-bt/js/reveal.min.js

8 lines
17 KiB
JavaScript
Raw Normal View History

2012-08-07 05:27:22 +00:00
/*!
* reveal.js 2.3 (2013-02-02, 17:04)
2012-08-07 05:27:22 +00:00
* http://lab.hakim.se/reveal-js
* MIT licensed
*
2012-08-07 05:27:22 +00:00
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
2013-01-31 05:09:28 +00:00
var Reveal=function(){"use strict";function w(e){if(!p&&!h){document.body.setAttribute("class","no-transforms");return}window.addEventListener("load",H,!1),L(i,e),S(),x()}function E(){c.theme=document.querySelector("#theme"),c.wrapper=document.querySelector(".reveal"),c.slides=document.querySelector(".reveal .slides");if(!c.wrapper.querySelector(".progress")&&i.progress){var e=document.createElement("div");e.classList.add("progress"),e.innerHTML="<span></span>",c.wrapper.appendChild(e)}if(!c.wrapper.querySelector(".controls")&&i.controls){var t=document.createElement("aside");t.classList.add("controls"),t.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>',c.wrapper.appendChild(t)}if(!c.wrapper.querySelector(".state-background")){var n=document.createElement("div");n.classList.add("state-background"),c.wrapper.appendChild(n)}if(!c.wrapper.querySelector(".pause-overlay")){var r=document.createElement("div");r.classList.add("pause-overlay"),c.wrapper.appendChild(r)}c.progress=document.querySelector(".reveal .progress"),c.progressbar=document.querySelector(".reveal .progress span"),i.controls&&(c.controls=document.querySelector(".reveal .controls"),c.controlsLeft=A(document.querySelectorAll(".navigate-left")),c.controlsRight=A(document.querySelectorAll(".navigate-right")),c.controlsUp=A(document.querySelectorAll(".navigate-up")),c.controlsDown=A(document.querySelectorAll(".navigate-down")),c.controlsPrev=A(document.querySelectorAll(".navigate-prev")),c.controlsNext=A(document.querySelectorAll(".navigate-next")))}function S(){navigator.userAgent.match(/(iphone|ipod)/i)&&(window.addEventListener("load",_,!1),window.addEventListener("orientationchange",_,!1))}function x(){function o(){t.length&&head.js.apply(null,t),T()}var e=[],t=[];for(var n=0,r=i.dependencies.length;n<r;n++){var s=i.dependencies[n];if(!s.condition||s.condition())s.async?t.push(s.src):e.push(s.src),typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],s.callback)}e.length?(head.ready(o),head.js.apply(null,e)):o()}function T(){E(),C(),N(),H(),Y(),rt(),setTimeout(function(){D("ready",{indexh:o,indexv:u,currentSlide:f})},1)}function N(){h===!1&&(i.transition="linear"),i.controls&&c.controls&&(c.controls.style.display="block"),i.progress&&c.progress&&(c.progress.style.display="block"),i.transition!=="default"&&c.wrapper.classList.add(i.transition),i.rtl&&c.wrapper.classList.add("rtl"),i.center&&c.wrapper.classList.add("center"),i.mouseWheel&&(document.addEventListener("DOMMouseScroll",dt,!1),document.addEventListener("mousewheel",dt,!1)),i.rollingLinks&&P();if(i.theme&&c.theme){var e=c.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,n=e.match(t)[0];i.theme!==n&&(e=e.replace(t,i.theme),c.theme.setAttribute("href",e))}}function C(){window.addEventListener("hashchange",mt,!1),window.addEventListener("resize",gt,!1),i.touch&&(document.addEventListener("touchstart",ct,!1),document.addEventListener("touchmove",ht,!1),document.addEventListener("touchend",pt,!1)),i.keyboard&&document.addEventListener("keydown",lt,!1),i.progress&&c.progress&&c.progress.addEventListener("click",M(vt),!1);if(i.controls&&c.controls){var e="ontouchstart"in window?"touchstart":"click";c.controlsLeft.forEach(function(t){t.addEventListener(e,M(it),!1)}),c.controlsRight.forEach(function(t){t.addEventListener(e,M(st),!1)}),c.controlsUp.forEach(function(t){t.addEventListener(e,M(ot),!1)}),c.controlsDown.forEach(function(t){t.addEventListener(e,M(ut),!1)}),c.controlsPrev.forEach(function(t){t.addEventListener(e,M(at),!1)}),c.controlsNext.forEach(function(t){t.addEventListener(e,M(ft),!1)})}}function k(){document.removeEventListener("keydown",lt,!1),window.removeEventListener("hashchange",mt,!1),window.removeEventListener("resize",gt,!1),i.touch&&(document.removeEventListener("touchstart",ct,!1),document.removeEventListener("touchmove",ht,!1),document.removeEventListener("touchend",pt,!1)),i.progress&&c.progress&&c.progress.removeEventListener("click",M(vt),!1);if(i.contro