Implement support for parameter station in the url.
This enables direct sharing / bookmarking of stations via url.
Behavior:
When the application loads it checks for parameter station in the url, where station holds the station id. E.g.: https://liquidradio.pro/?station=liquid_radio. If the parameter matches a station it selects that station initially. When the user selections a new station the parameter in the url is updated accordingly.
This function could be used to extract the parameter:
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
}
Implement support for parameter
station
in the url. This enables direct sharing / bookmarking of stations via url.Behavior: When the application loads it checks for parameter
station
in the url, where station holds the station id. E.g.:https://liquidradio.pro/?station=liquid_radio
. If the parameter matches a station it selects that station initially. When the user selections a new station the parameter in the url is updated accordingly.This function could be used to extract the parameter: