override any value throguh query, deserialize values of getQueryHash #641

This commit is contained in:
Hakim El Hattab 2013-10-11 22:33:23 -04:00
parent b455b0281d
commit 88d84e4551
2 changed files with 12 additions and 2 deletions

View File

@ -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;
},

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long