diff --git a/js/script.js b/js/script.js index 3deef6f..ab29486 100644 --- a/js/script.js +++ b/js/script.js @@ -1 +1 @@ -function idClickListener(e,t){document.getElementById(e).addEventListener("click",t)}function queryClickListener(e,t){document.querySelectorAll(e).forEach(function(e){e.addEventListener("click",t)})}function fx(e){console.log(e);var t=document.getElementById(e),a=0,n=1,s=1;return fx.transition=function(e,t,n,i,o){for(var l=0;l=24&&"UC"===username.substr(0,2).toUpperCase()?"id":"forUsername",t="https://www.googleapis.com/youtube/v3/channels?part=contentDetails&"+e+"="+username+"&fields=items/contentDetails/relatedPlaylists/uploads&key="+getKey();AJX(t,function(t){var a="https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId="+t.items[0].contentDetails.relatedPlaylists.uploads+"&maxResults=50&fields=items/snippet/resourceId/videoId&key="+getKey();AJX(a,function(t){for(var a=0;t.items[a];a+=1)pushViews("https://www.googleapis.com/youtube/v3/videos?part=statistics&id="+t.items[a].snippet.resourceId.videoId+"&fields=items/statistics/viewCount&key="+getKey(),a);getScript("https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.js",function(){isChart=1,document.getElementById("extra").classList.remove("extraCol"),document.getElementById("extra").classList.add("extraExp"),fx("showextra").fadeOut(),fx("hideextra").fadeIn(),extraswitch=1;for(var t=[],a=[],n=0;n25)){vids=Number(document.getElementById("vids").value);for(var e=0,t=0,a=0;a=24&&"UC"===username.substr(0,2).toUpperCase()?"id":"forUsername",t="https://www.googleapis.com/youtube/v3/channels?part=contentDetails&"+e+"="+username+"&fields=items/contentDetails/relatedPlaylists/uploads&key="+getKey();AJX(t,function(t){var a="https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId="+t.items[0].contentDetails.relatedPlaylists.uploads+"&maxResults=50&fields=items/snippet/resourceId/videoId&key="+getKey();AJX(a,function(t){for(var a=0;t.items[a];a++)pushViews("https://www.googleapis.com/youtube/v3/videos?part=statistics&id="+t.items[a].snippet.resourceId.videoId+"&fields=items/statistics/viewCount&key="+getKey(),a);getScript("https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.js",function(){isChart=1,document.getElementById("extra").classList.remove("extraCol"),document.getElementById("extra").classList.add("extraExp"),fx("showextra").fadeOut(),fx("hideextra").fadeIn(),extraswitch=1;for(var t=[],a=[],n=0;n25)){vids=Number(document.getElementById("vids").value);for(var e=0,t=0,a=0;a0;l--)views.push(l);var extraswitch=0,myLineChart2,myLineChart3,myLineChart4,vids=5;if(internet)for(var images=document.getElementsByTagName("img"),pl=0;pl