Created
April 19, 2013 12:26
-
-
Save pulse00/5420009 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hawtioPluginLoader.parseQueryString = function(text) { | |
var query = (text || window.location.search || '?'); | |
if (query instanceof Array) { | |
query = query.pop(); | |
} | |
var map = {}; | |
query.replace(/([^&=]+)=?([^&]*)(?:&+|$)/g, function(match, key, value) { | |
(map[key] = map[key] || []).push(value); | |
}); | |
return map; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment