forked from astefanutti/decktape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshower-1.x.js
52 lines (43 loc) · 1.2 KB
/
shower-1.x.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function Shower(page) {
this.page = page;
}
Shower.prototype = {
getName: function () {
return 'Shower 1.x';
},
isActive: function () {
return this.page.evaluate(function () {
return typeof shower === 'object' && typeof shower.modules === 'undefined';
});
},
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);
};