Make getURLParameter available as a universal parser

It seems to me like it could be useful to have one JS URL parser to
extract the value of a parameter in both the address in the browser and
a URL passed as a parameter