diff --git a/hash.js b/hash.js index 6cb9a4c..536b55e 100644 --- a/hash.js +++ b/hash.js @@ -4,7 +4,7 @@ var hash = (function() { var fromHash = function() { - var params = window.location.hash ? window.location.hash.substr(1).split("&") : [], + var params = window.location.hash ? ( window.location.hash.indexOf("!") === 1 ? window.location.hash.substr(2).split("&") : window.location.hash.substr(1).split("&") ) : [], paramsObject = {}; for(var i = 0; i < params.length; i++) { @@ -53,4 +53,4 @@ var hash = (function() { })(); window.hash = hash; -})(window); \ No newline at end of file +})(window);