diff --git a/index3.html b/index3.html index 31d55cf..f18b8b9 100644 --- a/index3.html +++ b/index3.html @@ -837,10 +837,10 @@ var isChart = 0; var notFound = 0; var firstload = 0; function queryName(query) { - var qType = 'q'; - if (rawInput.slice(0, 2).toUpperCase()==='UC' && rawInput.length===24) qType = 'id';//change query type to id if rawinput is id. + var qType = 'search?part=snippet&q'; + if (rawInput.slice(0, 2).toUpperCase()==='UC' && rawInput.length===24) qType = 'channels?part=snippet&id=';//change query type to id if rawinput is id. var u = ''; - if (!query) u = 'https://www.googleapis.com/youtube/v3/search?part=snippet&'+qType+'=' + encodeURIComponent(rawInput) + '&fields=items/snippet&type=channel&maxResults=1&key='; + if (!query) u = 'https://www.googleapis.com/youtube/v3/'+qType+'=' + encodeURIComponent(rawInput) + '&fields=items/snippet&type=channel&maxResults=1&key='; else u = query;//query is used only for suggests. try { ajx(u + getKey(), function (e) {