New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

shower-core

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shower-core - npm Package Compare versions

Comparing version 1.0.7 to 1.1.0

14

package.json
{
"name": "shower-core",
"description": "Core for Shower HTML presentation engine",
"version": "1.0.7",
"version": "1.1.0",
"author": {

@@ -30,9 +30,9 @@ "name": "Vadim Makeev",

"grunt": "^0.4.5",
"grunt-bump": "^0.0.15",
"grunt-casperjs": "2.0.1",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-uglify": "^0.5.1",
"grunt-bump": "^0.6.0",
"grunt-casperjs": "2.1.0",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-uglify": "^0.9.2",
"grunt-contrib-watch": "^0.6.1",
"grunt-jscs": "^0.7.1",
"load-grunt-tasks": "^0.6.0"
"grunt-jscs": "^2.1.0",
"load-grunt-tasks": "^3.3.0"
},

@@ -39,0 +39,0 @@ "scripts": {

/**
* Core for Shower HTML presentation engine
* shower-core v1.0.6, https://github.com/shower/core
* @copyright 2010–2014 Vadim Makeev, http://pepelsbey.net
* shower-core v1.0.7, https://github.com/shower/core
* @copyright 2010–2015 Vadim Makeev, http://pepelsbey.net
* @license MIT license: github.com/shower/shower/wiki/MIT-License
*/
window.shower&&window.shower.init||(window.shower=function(a,b){function c(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b])}var d,e={},f=a.location,g=a.console,h=b.title,i=[],j=[],k=!(!a.history||!a.history.pushState);e.debugMode=!1,c.prototype={getSlideNumber:function(){return this.number},isLast:function(){return e.slideList.length===this.number+1},isFinished:function(){return this.innerComplete>=this.innerLength},process:function(a){return this.timing?(this.initTimer(a),this):(this.next(a),this)},initTimer:function(a){var b=this;return b.timing?(b.stopTimer(),d=b.isFinished()?setInterval(function(){b.stopTimer(),a.next()},b.timing*(b.innerLength||1)):setInterval(function(){b.isFinished()?(b.stopTimer(),a.next()):b.next(a)},b.timing),this):!1},stopTimer:function(){return d&&(clearInterval(d),d=!1),this},prev:function(a){var c,d=this;return!d.hasInnerNavigation||d.isFinished()||0===d.innerComplete?(a.prev(),!1):(c=b.getElementById(d.id).querySelectorAll(".next.active"),!c||c.length<1?!1:(d.innerComplete>0?(d.innerComplete--,c[c.length-1].classList.remove("active")):a.prev(),this))},next:function(a){var c,d=this;return!d.hasInnerNavigation||d.isFinished()?(a.next(),!1):(d.isFinished()||(c=b.getElementById(d.id).querySelectorAll(".next:not(.active)"),c[0].classList.add("active"),d.innerComplete++),this)}},e._getData=function(a,b){return a.dataset?a.dataset[b]:a.getAttribute("data-"+b)},e.slideList=[],e.init=function(a,d){var f;e.debugMode&&(b.body.classList.add("debug"),g.log("Debug mode on")),a=a||".slide",d=d||"div.progress div";var h=b.createElement("section");h.className="live-region",h.setAttribute("role","region"),h.setAttribute("aria-live","assertive"),h.setAttribute("aria-relevant","additions"),h.setAttribute("aria-label","Slide Content: Auto-updating"),b.body.appendChild(h),i=b.querySelectorAll(a),j=b.querySelector(d);for(var k=0;k<i.length;k++)i[k].id||(i[k].id=k+1),f=e._getData(i[k],"timing"),f&&/^(\d{1,2}:)?\d{1,3}$/.test(f)?(-1!==f.indexOf(":")?(f=f.split(":"),f=1e3*(60*parseInt(f[0],10)+parseInt(f[1],10))):f=1e3*parseInt(f,10),0===f&&(f=!1)):f=!1,e.slideList.push(new c({id:i[k].id,number:k,hasInnerNavigation:null!==i[k].querySelector(".next"),timing:f,innerLength:i[k].querySelectorAll(".next").length,innerComplete:0}));return e},e.run=function(){var a=e.getCurrentSlideNumber(),c=b.body.classList.contains("full")||e.isSlideMode();c&&-1===a?e.go(0):-1===a&&""!==f.hash&&e.go(0),a>=0&&e.go(a),c&&e.enterSlideMode()},e._getTransform=function(){var c=Math.max(b.body.clientWidth/a.innerWidth,b.body.clientHeight/a.innerHeight);return"scale("+1/c+")"},e._applyTransform=function(a){return["WebkitTransform","MozTransform","msTransform","OTransform","transform"].forEach(function(c){b.body.style[c]=a}),!0},e._isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},e._normalizeSlideNumber=function(a){if(!e._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return 0>a&&(a=0),a>=e.slideList.length&&(a=e.slideList.length-1),a},e._getSlideIdByEl=function(a){for(;"BODY"!==a.nodeName&&"HTML"!==a.nodeName;){if(a.classList.contains("slide"))return a.id;a=a.parentNode}return""},e._checkInteractiveElement=function(a){return"A"===a.target.nodeName},e.getSlideNumber=function(a){var b,c=e.slideList.length-1;for(""===a&&(b=0);c>=0;--c)if(a===e.slideList[c].id){b=c;break}return b},e.go=function(a,b){var c;if(!e._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return e.slideList[a]?(f.hash=e.getSlideHash(a),e.updateProgress(a),e.updateActiveAndVisitedSlides(a),e.isSlideMode()&&(e.showPresenterNotes(a),c=e.slideList[a],c.timing&&c.initTimer(e)),"function"==typeof b&&b(),a):!1},e.next=function(a){var b=e.getCurrentSlideNumber(),c=e.slideList[b+1];return c?(e.go(b+1),"function"==typeof a&&a(),this):!1},e._turnNextSlide=function(a){var b=e.getCurrentSlideNumber(),c=e.slideList[b];e.isSlideMode()?(c.stopTimer(),c.next(e)):e.go(b+1),"function"==typeof a&&a()},e.prev=e.previous=function(a){var b=e.getCurrentSlideNumber();return 1>b?!1:(e.go(b-1),"function"==typeof a&&a(),!0)},e._turnPreviousSlide=function(a){var b=e.getCurrentSlideNumber(),c=e.slideList[b];return c.stopTimer(),e.isSlideMode()?c.prev(e):e.go(b-1),"function"==typeof a&&a(),!0},e.first=function(a){var b=e.slideList[e.getCurrentSlideNumber()];b&&b.timing&&b.stopTimer(),e.go(0),"function"==typeof a&&a()},e.last=function(a){var b=e.slideList[e.getCurrentSlideNumber()];b&&b.timing&&b.stopTimer(),e.go(e.slideList.length-1),"function"==typeof a&&a()},e.enterSlideMode=function(a){var c=e.getCurrentSlideNumber();return b.body.classList.remove("list"),b.body.classList.add("full"),e.isListMode()&&k&&history.pushState(null,null,f.pathname+"?full"+e.getSlideHash(c)),e._applyTransform(e._getTransform()),"function"==typeof a&&a(),!0},e.enterListMode=function(a){var c;return b.body.classList.remove("full"),b.body.classList.add("list"),e.clearPresenterNotes(),e._applyTransform("none"),e.isListMode()?!1:(c=e.getCurrentSlideNumber(),e.slideList[c].stopTimer(),e.isSlideMode()&&k&&history.pushState(null,null,f.pathname+e.getSlideHash(c)),e.scrollToSlide(c),"function"==typeof a&&a(),!0)},e.toggleMode=function(a){return e.isListMode()?e.enterSlideMode():e.enterListMode(),"function"==typeof a&&a(),!0},e.getCurrentSlideNumber=function(){var a=e.slideList.length-1,b=f.hash.substr(1);if(""===b)return-1;for(;a>=0;--a)if(b===e.slideList[a].id)return a;return-1},e.scrollToSlide=function(c){var d,f=!1;if(!e._isNumber(c))throw new Error("Gimme slide number as Number, baby!");if(e.isSlideMode())throw new Error("You can't scroll to because you in slide mode. Please, switch to list mode.");if(-1===c)return f;if(!e.slideList[c])throw new Error("There is no slide with number "+c);return d=b.getElementById(e.slideList[c].id),a.scrollTo(0,d.offsetTop),f=!0,f},e.isListMode=function(){return k?!/^full.*/.test(f.search.substr(1)):b.body.classList.contains("list")},e.isSlideMode=function(){return k?/^full.*/.test(f.search.substr(1)):b.body.classList.contains("full")},e.updateProgress=function(a){if(null===j)return!1;if(!e._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return progressVal=(100/(e.slideList.length-1)*e._normalizeSlideNumber(a)).toFixed(2)+"%",j.style.width=progressVal,j.setAttribute("role","progressbar"),j.setAttribute("aria-valuenow",progressVal),j.setAttribute("aria-valuemin","0"),j.setAttribute("aria-valuemax","100"),j.setAttribute("aria-valuetext","Slideshow Progress: "+progressVal),!0},e.updateActiveAndVisitedSlides=function(a){var c,d,f=e.slideList.length;if(a=e._normalizeSlideNumber(a),!e._isNumber(a))throw new Error("Gimme slide number as Number, baby!");for(c=0;f>c;++c)d=b.getElementById(e.slideList[c].id),a>c?(d.classList.remove("active"),d.classList.add("visited")):c>a?(d.classList.remove("visited"),d.classList.remove("active")):(d.classList.remove("visited"),d.classList.add("active"),b.querySelector(".live-region").innerHTML=d.innerHTML);return!0},e.clearPresenterNotes=function(){e.isSlideMode()&&g&&g.clear&&!e.debugMode&&g.clear()},e.showPresenterNotes=function(a){if(e.clearPresenterNotes(),g){a=e._normalizeSlideNumber(a);var c=e.slideList[a].id,d=b.getElementById(c).querySelector("footer");d&&d.innerHTML&&g.info(d.innerHTML.replace(/\n\s+/g,"\n"));var f=e._getSlideTitle(a+1);f&&g.info("NEXT: "+f)}},e._getSlideTitle=function(a){if(!e.slideList[a])return"";var c=e.slideList[a].id,d=b.getElementById(c).querySelector("h2");return d?d.textContent.replace(/\s+/g," ").replace(/^\s+|\s+$/g,""):void 0},e.getSlideHash=function(a){if(!e._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return a=e._normalizeSlideNumber(a),"#"+e.slideList[a].id};for(var l in a.shower)e[l]=a.shower[l];return a.addEventListener("DOMContentLoaded",function(){e.init().run()},!1),a.addEventListener("popstate",function(){var a=e.getCurrentSlideNumber(),c=b.body.classList.contains("full")||e.isSlideMode();b.title=e._getSlideTitle(a)?e._getSlideTitle(a)+" — "+h:h,c&&-1===a?e.go(0):-1===a&&""!==f.hash&&e.go(0),e.isListMode()?e.enterListMode():e.enterSlideMode()},!1),a.addEventListener("resize",function(){e.isSlideMode()&&e._applyTransform(e._getTransform())},!1),b.addEventListener("keydown",function(a){var b,c=e.getCurrentSlideNumber(),d=e.slideList[-1!==c?c:0];switch(a.which){case 80:e.isListMode()&&a.altKey&&a.metaKey&&(a.preventDefault(),b=d.number,e.go(b),e.enterSlideMode(),e.showPresenterNotes(b),d.timing&&d.initTimer(e));break;case 116:a.preventDefault(),e.isListMode()?(b=a.shiftKey?d.number:0,e.go(b),e.enterSlideMode(),e.showPresenterNotes(b),d.timing&&d.initTimer(e)):e.enterListMode();break;case 13:e.isListMode()&&-1!==c&&(a.preventDefault(),e.enterSlideMode(),e.showPresenterNotes(c),d.timing&&d.initTimer(e));break;case 27:e.isSlideMode()&&(a.preventDefault(),e.enterListMode());break;case 33:case 38:case 37:case 72:case 75:if(a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault(),e._turnPreviousSlide();break;case 34:case 40:case 39:case 76:case 74:if(a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault(),e._turnNextSlide();break;case 36:a.preventDefault(),e.first();break;case 35:a.preventDefault(),e.last();break;case 9:case 32:if(a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault(),e[a.shiftKey?"_turnPreviousSlide":"_turnNextSlide"]()}},!1),b.addEventListener("click",function(a){var b,c,d=e._getSlideIdByEl(a.target);d&&e.isListMode()&&(b=e.getSlideNumber(d),e.go(b),e.enterSlideMode(),e.showPresenterNotes(b),c=e.slideList[b],c.timing&&c.initTimer(e))},!1),b.addEventListener("touchstart",function(b){var c,d,f,g=e._getSlideIdByEl(b.target);g&&(e.isSlideMode()&&!e._checkInteractiveElement(b)&&(f=b.touches[0].pageX,f>a.innerWidth/2?e._turnNextSlide():e._turnPreviousSlide()),e.isListMode()&&(c=e.getSlideNumber(g),e.go(c),e.enterSlideMode(),e.showPresenterNotes(c),d=e.slideList[c],d.timing&&d.initTimer(e)))},!1),b.addEventListener("touchmove",function(a){e.isSlideMode()&&a.preventDefault()},!1),e}(this,this.document));
window.shower&&window.shower.init||(window.shower=function(a,b,c){function d(a){a=a||{},this._storageKey="shower",this._store=this._loadFromStorage()||a}function e(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b])}var f,g={},h=a.location,i=a.console,j=b.title,k=[],l=[],m={FULL:"full",LIST:"list"};g.debugMode=!1,d.prototype={set:function(a,b){return this._store[a]=b,this._saveToStorage(),this},unset:function(a){return delete this._store[a],this._saveToStorage(),this},get:function(a,b){var c=this._store[a];return"undefined"!=typeof c?c:b},_saveToStorage:function(){a.sessionStorage.setItem(this._storageKey,JSON.stringify(this._store))},_loadFromStorage:function(){var b=a.sessionStorage.getItem(this._storageKey);return b&&JSON.parse(b)}},g.state=new d({mode:m.LIST}),e.prototype={getSlideNumber:function(){return this.number},isLast:function(){return g.slideList.length===this.number+1},isFinished:function(){return this.innerComplete>=this.innerLength},process:function(a){return this.timing?(this.initTimer(a),this):(this.next(a),this)},initTimer:function(a){var b=this;return b.timing?(b.stopTimer(),f=b.isFinished()?setInterval(function(){b.stopTimer(),a.next()},b.timing*(b.innerLength||1)):setInterval(function(){b.isFinished()?(b.stopTimer(),a.next()):b.next(a)},b.timing),this):!1},stopTimer:function(){return f&&(clearInterval(f),f=!1),this},prev:function(a){var c,d=this;return!d.hasInnerNavigation||d.isFinished()||0===d.innerComplete?(a.prev(),!1):(c=b.getElementById(d.id).querySelectorAll(".next.active"),!c||c.length<1?!1:(d.innerComplete>0?(d.innerComplete--,c[c.length-1].classList.remove("active")):a.prev(),this))},next:function(a){var c,d=this;return!d.hasInnerNavigation||d.isFinished()?(a.next(),!1):(d.isFinished()||(c=b.getElementById(d.id).querySelectorAll(".next:not(.active)"),c[0].classList.add("active"),d.innerComplete++),this)}},g._getData=function(a,b){return a.dataset?a.dataset[b]:a.getAttribute("data-"+b)},g.slideList=[],g.init=function(a,c){var d;g.debugMode&&(b.body.classList.add("debug"),i.log("Debug mode on")),a=a||".slide",c=c||"div.progress div";var f=b.createElement("section");f.className="live-region",f.setAttribute("role","region"),f.setAttribute("aria-live","assertive"),f.setAttribute("aria-relevant","additions"),f.setAttribute("aria-label","Slide Content: Auto-updating"),b.body.appendChild(f),k=b.querySelectorAll(a),l=b.querySelector(c);for(var h=0;h<k.length;h++)k[h].id||(k[h].id=h+1),d=g._getData(k[h],"timing"),d&&/^(\d{1,2}:)?\d{1,3}$/.test(d)?(-1!==d.indexOf(":")?(d=d.split(":"),d=1e3*(60*parseInt(d[0],10)+parseInt(d[1],10))):d=1e3*parseInt(d,10),0===d&&(d=!1)):d=!1,g.slideList.push(new e({id:k[h].id,number:h,hasInnerNavigation:null!==k[h].querySelector(".next"),timing:d,innerLength:k[h].querySelectorAll(".next").length,innerComplete:0}));return g},g.run=function(){var a=g.getCurrentSlideNumber(),c=b.body.classList.contains("full")||g.isSlideMode();c&&-1===a?g.go(0):-1===a&&""!==h.hash&&g.go(0),a>=0&&g.go(a),c&&g.enterSlideMode()},g._getTransform=function(){var c=Math.max(b.body.clientWidth/a.innerWidth,b.body.clientHeight/a.innerHeight);return"scale("+1/c+")"},g._applyTransform=function(a){return["WebkitTransform","MozTransform","msTransform","OTransform","transform"].forEach(function(c){b.body.style[c]=a}),!0},g._isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},g._normalizeSlideNumber=function(a){if(!g._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return 0>a&&(a=0),a>=g.slideList.length&&(a=g.slideList.length-1),a},g._getSlideIdByEl=function(a){for(;"BODY"!==a.nodeName&&"HTML"!==a.nodeName;){if(a.classList.contains("slide"))return a.id;a=a.parentNode}return""},g._checkInteractiveElement=function(a){return"A"===a.target.nodeName},g.getSlideNumber=function(a){var b,c=g.slideList.length-1;for(""===a&&(b=0);c>=0;--c)if(a===g.slideList[c].id){b=c;break}return b},g.go=function(a,b){var c;if(!g._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return g.slideList[a]?(h.hash=g.getSlideHash(a),g.updateProgress(a),g.updateActiveAndVisitedSlides(a),g.isSlideMode()&&(g.showPresenterNotes(a),c=g.slideList[a],c.timing&&c.initTimer(g)),"function"==typeof b&&b(),a):!1},g.next=function(a){var b=g.getCurrentSlideNumber(),c=g.slideList[b+1];return c?(g.go(b+1),"function"==typeof a&&a(),this):!1},g._turnNextSlide=function(a){var b=g.getCurrentSlideNumber(),c=g.slideList[b];g.isSlideMode()?(c.stopTimer(),c.next(g)):g.go(b+1),"function"==typeof a&&a()},g.prev=g.previous=function(a){var b=g.getCurrentSlideNumber();return 1>b?!1:(g.go(b-1),"function"==typeof a&&a(),!0)},g._turnPreviousSlide=function(a){var b=g.getCurrentSlideNumber(),c=g.slideList[b];return c.stopTimer(),g.isSlideMode()?c.prev(g):g.go(b-1),"function"==typeof a&&a(),!0},g.first=function(a){var b=g.slideList[g.getCurrentSlideNumber()];b&&b.timing&&b.stopTimer(),g.go(0),"function"==typeof a&&a()},g.last=function(a){var b=g.slideList[g.getCurrentSlideNumber()];b&&b.timing&&b.stopTimer(),g.go(g.slideList.length-1),"function"==typeof a&&a()},g.enterSlideMode=function(a){g.getCurrentSlideNumber();return g.state.set("mode",m.FULL),b.body.classList.remove("list"),b.body.classList.add("full"),g._applyTransform(g._getTransform()),"function"==typeof a&&a(),!0},g.enterListMode=function(a){var c;return b.body.classList.remove("full"),b.body.classList.add("list"),g.clearPresenterNotes(),g._applyTransform("none"),g.isListMode()?!1:(c=g.getCurrentSlideNumber(),g.state.set("mode",m.LIST),g.slideList[c].stopTimer(),g.scrollToSlide(c),"function"==typeof a&&a(),!0)},g.toggleMode=function(a){return g.isListMode()?g.enterSlideMode():g.enterListMode(),"function"==typeof a&&a(),!0},g.getCurrentSlideNumber=function(){var a=g.slideList.length-1,b=h.hash.substr(1);if(""===b)return-1;for(;a>=0;--a)if(b===g.slideList[a].id)return a;return-1},g.scrollToSlide=function(c){var d,e=!1;if(!g._isNumber(c))throw new Error("Gimme slide number as Number, baby!");if(g.isSlideMode())throw new Error("You can't scroll to because you in slide mode. Please, switch to list mode.");if(-1===c)return e;if(!g.slideList[c])throw new Error("There is no slide with number "+c);return d=b.getElementById(g.slideList[c].id),a.scrollTo(0,d.offsetTop),e=!0,e},g.isListMode=function(){return g.state.get("mode")===m.LIST},g.isSlideMode=function(){return g.state.get("mode")===m.FULL},g.updateProgress=function(a){if(null===l)return!1;if(!g._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return progressVal=(100/(g.slideList.length-1)*g._normalizeSlideNumber(a)).toFixed(2)+"%",l.style.width=progressVal,l.setAttribute("role","progressbar"),l.setAttribute("aria-valuenow",progressVal),l.setAttribute("aria-valuemin","0"),l.setAttribute("aria-valuemax","100"),l.setAttribute("aria-valuetext","Slideshow Progress: "+progressVal),!0},g.updateActiveAndVisitedSlides=function(a){var c,d,e=g.slideList.length;if(a=g._normalizeSlideNumber(a),!g._isNumber(a))throw new Error("Gimme slide number as Number, baby!");for(c=0;e>c;++c)d=b.getElementById(g.slideList[c].id),a>c?(d.classList.remove("active"),d.classList.add("visited")):c>a?(d.classList.remove("visited"),d.classList.remove("active")):(d.classList.remove("visited"),d.classList.add("active"),b.querySelector(".live-region").innerHTML=d.innerHTML);return!0},g.clearPresenterNotes=function(){g.isSlideMode()&&i&&i.clear&&g.debugMode&&i.clear()},g.showPresenterNotes=function(a){if(g.clearPresenterNotes(),i&&g.debugMode){a=g._normalizeSlideNumber(a);var c=g.slideList[a].id,d=b.getElementById(c).querySelector("footer");d&&d.innerHTML&&i.info(d.innerHTML.replace(/\n\s+/g,"\n"));var e=g._getSlideTitle(a+1);e&&i.info("NEXT: "+e)}},g._getSlideTitle=function(a){if(!g.slideList[a])return"";var c=g.slideList[a].id,d=b.getElementById(c).querySelector("h2");return d?d.textContent.replace(/\s+/g," ").replace(/^\s+|\s+$/g,""):void 0},g._setTitle=function(){var a=g.getCurrentSlideNumber();g.isSlideMode();g._getSlideTitle(a)?b.title=g._getSlideTitle(a)+" — "+j:b.title=j},g.getSlideHash=function(a){if(!g._isNumber(a))throw new Error("Gimme slide number as Number, baby!");return a=g._normalizeSlideNumber(a),"#"+g.slideList[a].id};for(var n in a.shower)g[n]=a.shower[n];return a.addEventListener("popstate",function(){var a=g.getCurrentSlideNumber();g._setTitle(),-1!==a||!g.isSlideMode()&&""===h.hash||g.go(0)},!1),a.addEventListener("DOMContentLoaded",function(){g.init().run()},!1),a.addEventListener("resize",function(){g.isSlideMode()&&g._applyTransform(g._getTransform())},!1),b.addEventListener("keydown",function(a){var b,c=g.getCurrentSlideNumber(),d=g.slideList[-1!==c?c:0];switch(a.which){case 80:g.isListMode()&&a.altKey&&a.metaKey&&(a.preventDefault(),b=d.number,g.go(b),g.enterSlideMode(),g.showPresenterNotes(b),d.timing&&d.initTimer(g));break;case 116:a.preventDefault(),g.isListMode()?(b=a.shiftKey?d.number:0,g.go(b),g.enterSlideMode(),g.showPresenterNotes(b),d.timing&&d.initTimer(g)):g.enterListMode();break;case 13:g.isListMode()&&-1!==c&&(a.preventDefault(),g.enterSlideMode(),g.showPresenterNotes(c),d.timing&&d.initTimer(g));break;case 27:g.isSlideMode()&&(a.preventDefault(),g.enterListMode());break;case 33:case 38:case 37:case 72:case 75:if(a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault(),g._turnPreviousSlide();break;case 34:case 40:case 39:case 76:case 74:if(a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault(),g._turnNextSlide();break;case 36:a.preventDefault(),g.first();break;case 35:a.preventDefault(),g.last();break;case 9:case 32:if(a.altKey||a.ctrlKey||a.metaKey)return;a.preventDefault(),g[a.shiftKey?"_turnPreviousSlide":"_turnNextSlide"]()}},!1),b.addEventListener("click",function(a){var b,c,d=g._getSlideIdByEl(a.target);d&&g.isListMode()&&(b=g.getSlideNumber(d),g.go(b),g.enterSlideMode(),g.showPresenterNotes(b),c=g.slideList[b],c.timing&&c.initTimer(g))},!1),b.addEventListener("touchstart",function(b){var c,d,e,f=g._getSlideIdByEl(b.target);f&&(g.isSlideMode()&&!g._checkInteractiveElement(b)&&(e=b.touches[0].pageX,e>a.innerWidth/2?g._turnNextSlide():g._turnPreviousSlide()),g.isListMode()&&(c=g.getSlideNumber(f),g.go(c),g.enterSlideMode(),g.showPresenterNotes(c),d=g.slideList[c],d.timing&&d.initTimer(g)))},!1),b.addEventListener("touchmove",function(a){g.isSlideMode()&&a.preventDefault()},!1),g}(this,this.document));
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc