From 29b0e86089eb3ec0d4bb5811c9b723dfcf36703c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 4 Oct 2018 14:48:01 +0200 Subject: remove head.min.js in favor of simple built-in script loader --- lib/js/head.min.js | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 lib/js/head.min.js (limited to 'lib/js') diff --git a/lib/js/head.min.js b/lib/js/head.min.js deleted file mode 100644 index 1527167..0000000 --- a/lib/js/head.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! head.core - v1.0.2 */ -(function(n,t){"use strict";function r(n){a[a.length]=n}function k(n){var t=new RegExp(" ?\\b"+n+"\\b");c.className=c.className.replace(t,"")}function p(n,t){for(var i=0,r=n.length;in?(i.screensCss.gt&&r("gt-"+n),i.screensCss.gte&&r("gte-"+n)):tt);u.feature("landscape",fe?(i.browserCss.gt&&r("gt-"+f+e),i.browserCss.gte&&r("gte-"+f+e)):h2&&this[u+1]!==t)u&&r(this.slice(u,u+1).join("-").toLowerCase()+i.section);else{var f=n||"index",e=f.indexOf(".");e>0&&(f=f.substring(0,e));c.id=f.toLowerCase()+i.page;u||r("root"+i.section)}});u.screen={height:n.screen.height,width:n.screen.width};tt();b=0;n.addEventListener?n.addEventListener("resize",it,!1):n.attachEvent("onresize",it)})(window); -/*! head.css3 - v1.0.0 */ -(function(n,t){"use strict";function a(n){for(var r in n)if(i[n[r]]!==t)return!0;return!1}function r(n){var t=n.charAt(0).toUpperCase()+n.substr(1),i=(n+" "+c.join(t+" ")+t).split(" ");return!!a(i)}var h=n.document,o=h.createElement("i"),i=o.style,s=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),c="Webkit Moz O ms Khtml".split(" "),l=n.head_conf&&n.head_conf.head||"head",u=n[l],f={gradient:function(){var n="background-image:";return i.cssText=(n+s.join("gradient(linear,left top,right bottom,from(#9f9),to(#fff));"+n)+s.join("linear-gradient(left top,#eee,#fff);"+n)).slice(0,-n.length),!!i.backgroundImage},rgba:function(){return i.cssText="background-color:rgba(0,0,0,0.5)",!!i.backgroundColor},opacity:function(){return o.style.opacity===""},textshadow:function(){return i.textShadow===""},multiplebgs:function(){i.cssText="background:url(https://),url(https://),red url(https://)";var n=(i.background||"").match(/url/g);return Object.prototype.toString.call(n)==="[object Array]"&&n.length===3},boxshadow:function(){return r("boxShadow")},borderimage:function(){return r("borderImage")},borderradius:function(){return r("borderRadius")},cssreflections:function(){return r("boxReflect")},csstransforms:function(){return r("transform")},csstransitions:function(){return r("transition")},touch:function(){return"ontouchstart"in n},retina:function(){return n.devicePixelRatio>1},fontface:function(){var t=u.browser.name,n=u.browser.version;switch(t){case"ie":return n>=9;case"chrome":return n>=13;case"ff":return n>=6;case"ios":return n>=5;case"android":return!1;case"webkit":return n>=5.1;case"opera":return n>=10;default:return!1}}};for(var e in f)f[e]&&u.feature(e,f[e].call(),!0);u.feature()})(window); -/*! head.load - v1.0.3 */ -(function(n,t){"use strict";function w(){}function u(n,t){if(n){typeof n=="object"&&(n=[].slice.call(n));for(var i=0,r=n.length;i elements { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, diff --git a/demo.html b/demo.html index 04b47d2..71f0c4c 100644 --- a/demo.html +++ b/demo.html @@ -399,7 +399,6 @@ Reveal.addEventListener( 'customevent', function() { // More info https://github.com/hakimel/reveal.js#dependencies dependencies: [ - { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, diff --git a/lib/js/classList.js b/lib/js/classList.js deleted file mode 100644 index 44f2b4c..0000000 --- a/lib/js/classList.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ -if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;pn;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t}); \ No newline at end of file diff --git a/plugin/highlight/highlight.js b/plugin/highlight/highlight.js index 446cfe1..6d6910b 100644 --- a/plugin/highlight/highlight.js +++ b/plugin/highlight/highlight.js @@ -97,8 +97,7 @@ c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}}); } } ); - // lofi xbrowser Promise.resolve() - return { then: function( resolve ) { resolve(); }}; + return Promise.resolve(); }, @@ -139,10 +138,13 @@ c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}}); linesToHighlight.split( ',' ).forEach( function( lineNumbers ) { + // Avoid failures becase of whitespace + lineNumbers = lineNumbers.replace( /\s/g, '' ); + // Ensure that we looking at a valid slide number (1 or 1-2) if( /^[\d-]+$/.test( lineNumbers ) ) { - lineNumbers = lineNumbers.split( '-' ) + lineNumbers = lineNumbers.split( '-' ); var lineStart = lineNumbers[0]; var lineEnd = lineNumbers[1] || lineStart; diff --git a/plugin/math/math.js b/plugin/math/math.js index a640e1f..b78d120 100755 --- a/plugin/math/math.js +++ b/plugin/math/math.js @@ -84,8 +84,7 @@ var RevealMath = window.RevealMath || (function(){ } ); - // lofi xbrowser Promise.resolve() - return { then: function( resolve ) { resolve(); }}; + return Promise.resolve(); } } diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js index 874e66d..54dcf31 100644 --- a/plugin/notes/notes.js +++ b/plugin/notes/notes.js @@ -168,8 +168,7 @@ var RevealNotes = (function() { } - // lofi xbrowser Promise.resolve() - return { then: function( resolve ) { resolve(); }}; + return Promise.resolve(); }, diff --git a/plugin/zoom-js/zoom.js b/plugin/zoom-js/zoom.js index 1a731d3..031514d 100644 --- a/plugin/zoom-js/zoom.js +++ b/plugin/zoom-js/zoom.js @@ -22,8 +22,7 @@ var RevealZoom = (function(){ } } ); - // lofi xbrowser Promise.resolve() - return { then: function( resolve ) { resolve(); }}; + return Promise.resolve(); } } -- cgit v1.2.3