› Foros › Feedback › Cuestiones técnicas
var getUrlParam = function(url, selectedParamName) { var urlParamStart = url.indexOf("?"); if (urlParamStart == -1) return ""; var urlParamEnd = url.indexOf("#", urlParamStart); if (urlParamEnd == -1) urlParamEnd = url.length; var paramArray = url.substring(urlParamStart + 1, urlParamEnd).split("&"); for (var i = 0; i < paramArray.length; i++) { var curParamValueStart = paramArray[i].indexOf("="); if (curParamValueStart != -1) { var curParamName = paramArray[i].substring(0, curParamValueStart); var curParamValue = paramArray[i].substring(curParamValueStart + 1); if (curParamName == selectedParamName) { return curParamValue; }; }; }; return "";};
getVidID = function(YTurl) { return getUrlParam(YTurl, "v"); };