summaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab2013-10-11 22:33:23 -0400
committerHakim El Hattab2013-10-11 22:33:23 -0400
commit88d84e45513d1623542f2e5e083bdb1dfcfbe135 (patch)
treec29268040876540fa932bde606fcd91a1f943bf1 /js/reveal.js
parentb455b0281dfe52dd9a01a0687d44895ff45a2d60 (diff)
override any value throguh query, deserialize values of getQueryHash #641
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 21e0006..63de377 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -193,6 +193,7 @@ var Reveal = (function(){
// Copy options over to our config object
extend( config, options );
+ extend( config, Reveal.getQueryHash() );
// Hide the address bar in mobile browsers
hideAddressBar();
@@ -2858,6 +2859,15 @@ var Reveal = (function(){
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
} );
+ // Basic deserialization
+ for( var i in query ) {
+ var value = query[ i ];
+ if( value === 'null' ) query[ i ] = null;
+ else if( value === 'true' ) query[ i ] = true;
+ else if( value === 'false' ) query[ i ] = false;
+ else if( !isNaN( parseFloat( value ) ) ) query[ i ] = parseFloat( value );
+ }
+
return query;
},