aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index b071cc3..4946df5 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -4099,6 +4099,23 @@
}
/**
+ * Returns an array of objects where each object represents the attributes on its respective slide.
+ */
+ function getSlidesMetaInfo() {
+
+ var slides = getSlides();
+ return slides.map( function (slide) {
+ var meta = {};
+ for( var i = 0; i < slide.attributes.length; i++ ) {
+ var attribute = slide.attributes[ i ];
+ meta[ attribute.name ] = attribute.value;
+ }
+ return meta;
+ } );
+
+ }
+
+ /**
* Retrieves the total number of slides in this presentation.
*
* @return {number}
@@ -5454,6 +5471,10 @@
// Returns an Array of all slides
getSlides: getSlides,
+ // Returns an Array of objects representing the attributes on
+ // the slides
+ getSlidesMetaInfo: getSlidesMetaInfo,
+
// Returns the total number of slides
getTotalSlides: getTotalSlides,