Hoofdpagina: verschil tussen versies
Uit WikiMeneer
(→Alle artikelen:) |
|||
Regel 30: | Regel 30: | ||
*[[Roy Donders]] | *[[Roy Donders]] | ||
*[[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> |
Versie van 9 aug 2017 om 01:13
“Ik ben zo slim, ik zou een eigen Wikipedia moeten beginnen!”
“Wij wisten altijd al dat Don het in zich had.”
“Hoi mam!”
In de onderstaande video is te zien dat Don een lopende Wikipedia is.
Alle artikelen:
- Kaasmeneer
- Dalai Don
- Leonardo Don Vinci
- Irriteerbeer
- Kilodon
- Lijst van rijkste mensen ter wereld
- Charles Donwin
- Donau
- Don Shakespeare
- Ruimtestation ISIS
- Roy Donders
- Muziek en sjit
<section>
0 abonnees
</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>