diff options
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js index d1d8ea6..26ebc48 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3300,17 +3300,20 @@ var Reveal = (function(){ getQueryHash: function() { var query = {}; - location.search.replace( /[A-Z0-9]+?=(\w*)/gi, function(a) { + location.search.replace( /[A-Z0-9]+?=([\w\.%-]*)/gi, function(a) { query[ a.split( '=' ).shift() ] = a.split( '=' ).pop(); } ); // Basic deserialization for( var i in query ) { var value = query[ i ]; + + query[ i ] = unescape( value ); + 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 ); + else if( value.match( /^\d+$/ ) ) query[ i ] = parseFloat( value ); } return query; |