Provide Simple Class to QueryString
(function(global) {
var QueryString = (function() {
function Class(){
if (this instanceof Class) {
} else {
throw new Error("Illegal constructor");
}
};
Class.get = function(/*String*/name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var pattern = "[\\?&]" + name + "=([^&#]*)",
regex = new RegExp(pattern),
results = regex.exec(window.location.search);
return (results === null) ? "" : global.decodeURIComponent(results[1].replace(/\+/g, " "));
};
return Class;
}());
global.QueryString = QueryString;
}(this));