1 2 3 |
function getURLParameter(name) { return decodeURIComponent((new RegExp(‘[?|&]’ + name + ‘=’ + ‘([^&;]+?)(&|#|;|$)’,‘i’).exec(location.search)||[,“”])[1].replace(/+/g, ‘%20’))||null; } |
Repair, restore, rebuild, return and repeat
1 2 3 |
function getURLParameter(name) { return decodeURIComponent((new RegExp(‘[?|&]’ + name + ‘=’ + ‘([^&;]+?)(&|#|;|$)’,‘i’).exec(location.search)||[,“”])[1].replace(/+/g, ‘%20’))||null; } |