copy-paste-bookmarks/js/reveal.min.js

7 lines
12 KiB
JavaScript
Raw Normal View History

2012-08-07 07:27:22 +02:00
/*!
2012-10-13 06:17:45 +02:00
* reveal.js 2.1 r30
2012-08-07 07:27:22 +02:00
* http://lab.hakim.se/reveal-js
* MIT licensed
*
2012-08-07 07:27:22 +02:00
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/var Reveal=function(){"use strict";function v(e){if(!l&&!f){document.body.setAttribute("class","no-transforms");return}x(n,e);m();g();y()}function m(){a.theme=document.querySelector("#theme");a.wrapper=document.querySelector(".reveal");if(!a.wrapper.querySelector(".progress")&&n.progress){var e=document.createElement("div");e.classList.add("progress");e.innerHTML="<span></span>";a.wrapper.appendChild(e)}if(!a.wrapper.querySelector(".controls")&&n.controls){var t=document.createElement("aside");t.classList.add("controls");t.innerHTML='<a class="left" href="#">&#x25C4;</a><a class="right" href="#">&#x25BA;</a><a class="up" href="#">&#x25B2;</a><a class="down" href="#">&#x25BC;</a>';a.wrapper.appendChild(t)}if(!a.wrapper.querySelector(".state-background")){var r=document.createElement("div");r.classList.add("state-background");a.wrapper.appendChild(r)}if(!a.wrapper.querySelector(".pause-overlay")){var i=document.createElement("div");i.classList.add("pause-overlay");a.wrapper.appendChild(i)}a.progress=document.querySelector(".reveal .progress");a.progressbar=document.querySelector(".reveal .progress span");if(n.controls){a.controls=document.querySelector(".reveal .controls");a.controlsLeft=document.querySelector(".reveal .controls .left");a.controlsRight=document.querySelector(".reveal .controls .right");a.controlsUp=document.querySelector(".reveal .controls .up");a.controlsDown=document.querySelector(".reveal .controls .down")}}function g(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";document.body.style.height="120%";window.addEventListener("load",C,!1);window.addEventListener("orientationchange",C,!1)}}function y(){function o(){head.js.apply(null,t);b()}var e=[],t=[];for(var r=0,i=n.dependencies.length;r<i;r++){var s=n.dependencies[r];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_\-]*)\.?[^\\\/]*$/i)[0],s.callback)}}if(e.length){head.ready(o);head.js.apply(null,e)}else o()}function b(){E();w();J();Y()}function w(){f===!1&&(n.transition="linear");n.controls&&a.controls&&(a.controls.style.display="block");n.progress&&a.progress&&(a.progress.style.display="block");if(n.theme&&a.theme){var e=a.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,r=e.match(t)[0];if(n.theme!==r){e=e.replace(t,n.theme);a.theme.setAttribute("href",e)}}n.transition!=="default"&&a.wrapper.classList.add(n.transition);if(n.mouseWheel){document.addEventListener("DOMMouseScroll",_,!1);document.addEventListener("mousewheel",_,!1)}n.rollingLinks&&H()}function E(){document.addEventListener("touchstart",A,!1);document.addEventListener("touchmove",O,!1);document.addEventListener("touchend",M,!1);window.addEventListener("hashchange",D,!1);n.keyboard&&document.addEventListener("keydown",L,!1);if(n.controls&&a.controls){a.controlsLeft.addEventListener("click",N(et),!1);a.controlsRight.addEventListener("click",N(tt),!1);a.controlsUp.addEventListener("click",N(nt),!1);a.controlsDown.addEventListener("click",N(rt),!1)}}function S(){document.removeEventListener("keydown",L,!1);document.removeEventListener("touchstart",A,!1);document.removeEventListener("touchmove",O,!1);document.removeEventListener("touchend",M,!1);window.removeEventListener("hashchange",D,!1);if(n.controls&&a.controls){a.controlsLeft.removeEventListener("click",N(et),!1);a.controlsRight.removeEventListener("click",N(tt),!1);a.controlsUp.removeEventListener("click",N(nt),!1);a.controlsDown.removeEventListener("click",N(rt),!1)}}function x(e,t){for(var n in t)e[n]=t[n]}function T(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function N(e){return function(t){t.preventDefault();e.call()}}function C(){setTimeout(function(){window.scrollTo(0,1)},0)}function k(e,t){var n=document.createEvent("HTMLEvents",1,2);n.initEvent(e,!0,!0);x(n,t);a.wrapper.dispatchEvent(n)}function L(e){if(document.querySelector(":focus")!==null||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)return;var t=!0;switch(e.keyCode){case 80:case 33:it();break;case 78:case 34:st();break;case