mirror of
https://github.com/astefanutti/decktape.git
synced 2024-12-14 16:52:54 +03:00
52 lines
1.1 KiB
JavaScript
52 lines
1.1 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);
|
|
}; |