|
|
(19 tussenliggende versies door dezelfde gebruiker niet weergegeven) |
Regel 29: |
Regel 29: |
| *[[Ruimtestation ISIS]] | | *[[Ruimtestation ISIS]] |
| *[[Roy Donders]] | | *[[Roy Donders]] |
| + | *[[Milan de hertenbeschieteraar]] |
| + | *[[Heeft Don Luxemburg al ingehaald?]] |
| *[[Muziek en sjit]] | | *[[Muziek en sjit]] |
− |
| |
− |
| |
− | <section>
| |
− | <h4><b id="sub">0</b> abonnees</h4>
| |
− | </section>
| |
− | <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
| |
− | <script src="https://apis.google.com/js/client.js?onload=init"></script>
| |
− | <script>
| |
− |
| |
− |
| |
− | $.getJSON('https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UCJEWezcQmA2_B6V-TrqjfMg&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c', function(subs) {
| |
− | document.getElementById("sub").innerHTML = Intl.NumberFormat().format(subs.items[ 0 ].statistics.subscriberCount) });
| |
− |
| |
− | //dit is voor de abonnee counter
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | function getJSON(url, callback) {
| |
− | var resp ;
| |
− | var xmlHttp ;
| |
− | resp = '' ;
| |
− | xmlHttp = new XMLHttpRequest();
| |
− | if(xmlHttp != null)
| |
− | {
| |
− | xmlHttp.open( "GET", url, false );
| |
− | xmlHttp.send( null );
| |
− | resp = xmlHttp.responseText;
| |
− | }
| |
− | return resp ;
| |
− | }
| |
− | var data = getJSON("https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&playlistId=PLhedRbFZOuDN1rkqCdH1P8Qxvo-a3fAcu&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c&maxResults=50");
| |
− | var jsondata = JSON.parse(data);
| |
− | var videos = jsondata['items'].slice(Math.max(jsondata['items'].length - 50, 1));
| |
− | var totalviewcount = 0;
| |
− | for(var video in videos){
| |
− | var metadata = getJSON("https://www.googleapis.com/youtube/v3/videos?part=statistics&id=" + videos[video]['contentDetails']['videoId'] + "&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c");
| |
− | var jsonvideodata = JSON.parse(metadata);
| |
− | totalviewcount += parseInt(jsonvideodata['items'][0]['statistics']['viewCount']);
| |
− | }
| |
− | document.getElementById("viewstotaal").innerHTML = Intl.NumberFormat().format(totalviewcount);
| |
− |
| |
− | //dit is voor het totaal aantal views
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | function getJSON(url, callback) {
| |
− | var resp ;
| |
− | var xmlHttp ;
| |
− | resp = '' ;
| |
− | xmlHttp = new XMLHttpRequest();
| |
− | if(xmlHttp != null)
| |
− | {
| |
− | xmlHttp.open( "GET", url, false );
| |
− | xmlHttp.send( null );
| |
− | resp = xmlHttp.responseText;
| |
− | }
| |
− | return resp ;
| |
− | }
| |
− | var data = getJSON("https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&playlistId=PLhedRbFZOuDN1rkqCdH1P8Qxvo-a3fAcu&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c&maxResults=50");
| |
− | var jsondata = JSON.parse(data);
| |
− | var videos = jsondata['items'].slice(Math.max(jsondata['items'].length - 50, 1));
| |
− | var totalviewcount = 0;
| |
− | for(var video in videos){
| |
− | var metadata = getJSON("https://www.googleapis.com/youtube/v3/videos?part=statistics&id=" + videos[video]['contentDetails']['videoId'] + "&key=AIzaSyA5yomMl6Eg6qV6BhjYBYQtqZTXnoreK0c");
| |
− | var jsonvideodata = JSON.parse(metadata);
| |
− | totalviewcount += parseInt(jsonvideodata['items'][0]['statistics']['likeCount']);
| |
− | }
| |
− | document.getElementById("likestotaal").innerHTML = Intl.NumberFormat().format(totalviewcount);
| |
− |
| |
− | //dit is voor het totaal aantal likes
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | </script>
| |