forked from astefanutti/decktape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcsss.js
51 lines (42 loc) · 1.21 KB
/
csss.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
function CSSS(page) {
this.page = page;
}
CSSS.prototype = {
getName: function () {
return 'CSSS';
},
isActive: function () {
return this.page.evaluate(function () {
// Avoid global variable name collision with remark.js
return typeof remark === 'undefined' && typeof slideshow === 'object';
});
},
configure: function () {
this.page.evaluate(function () {
document.getElementById('timer').style.display = 'none';
});
},
slideCount: function () {
return this.page.evaluate(function () {
return document.querySelectorAll('.slide, .delayed, .delayed-children > *').length;
});
},
hasNextSlide: function () {
return this.page.evaluate(function () {
return (slideshow.index + 1) in slideshow.slides;
});
},
nextSlide: function () {
this.page.evaluate(function () {
slideshow.next(false);
});
},
currentSlideIndex: function () {
return this.page.evaluate(function () {
return slideshow.slides[slideshow.slide].id;
});
}
};
exports.create = function (page) {
return new CSSS(page);
};