Online Ordering – Slidell
var getParams = function (url) {
var params = {};
var parser = document.createElement('a');
parser.href = url;
var query = parser.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); if(pair.length > 2) {
params[pair[0]] = decodeURIComponent(pair[1] + '=' + pair[2]);
}
else {
params[pair[0]] = decodeURIComponent(pair[1]);
}
}
if(params['path']){
params['path'] = params['path'].replace("path=","");
}
return params;
};
var baseURL = "https://www.iheartjane.com/embed/stores/5614/“;
var params = getParams(window.location.href);
if(params['path']){
var newSrc = baseURL + params['path'];
if (params['promo_code']) {
newSrc = newSrc + '&promo_code=' + params['promo_code'];
}
document.getElementById('jane-menu').src = newSrc;
}