function getParam(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\$&"); var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); if (!results) return null; if (!results[2]) return ""; return decodeURIComponent(results[2].replace(/\+/g, " ")); } var opid = 1; var locationPort = location.port == '' ? '' : ':' + location.port; window['apiUrl'] = location.hostname + locationPort + '/api/playerv2/'; window['apiOperator'] = getParam('operator') ? getParam('operator') : opid; window['availableLanguages'] = 'en;en';