зеркало из https://github.com/openwpm/OpenWPM.git
8 строки
323 B
JavaScript
8 строки
323 B
JavaScript
function getParameterByName(name) {
|
|
// http://stackoverflow.com/a/901144
|
|
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
|
|
results = regex.exec(location.search);
|
|
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
}
|