Skip to content

Instantly share code, notes, and snippets.

@pulse00
Created April 19, 2013 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pulse00/5420009 to your computer and use it in GitHub Desktop.
Save pulse00/5420009 to your computer and use it in GitHub Desktop.
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