decktape/plugins/shower.js
Antonin Stefanutti 4cbedc5945 Code formatting
2015-08-09 18:02:49 +02:00

52 lines
1.2 KiB
JavaScript

function Shower(page) {
this.page = page;
}
Shower.prototype = {
getName: function () {
return "Shower";
},
isActive: function () {
return this.page.evaluate(function () {
return typeof shower === "object";
});
},
configure: function () {
this.page.evaluate(function () {
shower.showPresenterNotes = function () {};
shower.first();
shower.enterSlideMode();
});
},
slideCount: function () {
return this.page.evaluate(function () {
return shower.slideList.length;
});
},
hasNextSlide: function () {
return this.page.evaluate(function () {
return (shower.getCurrentSlideNumber() + 1) in shower.slideList;
});
},
nextSlide: function () {
this.page.evaluate(function () {
shower.next();
});
},
currentSlideIndex: function () {
return this.page.evaluate(function () {
return shower.getSlideHash(shower.getCurrentSlideNumber()).substring(1);
});
}
};
exports.create = function (page) {
return new Shower(page);
};