-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
156 lines (153 loc) · 3.81 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html>
<head>
<title> jQuery Youtube </title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<style type="text/css">
.videos {
list-style: none;
margin: 0;
padding: 0;
overflow: hidden;
}
.videos li {
float: left;
border: 1px solid #B6B6B6;
width: 150px;
height: 140px;
margin: 0 10px 10px 0;
padding: 5px;
}
.videos li img {
width: 120px;
height: 90px;
}
ul.videos.large li {
width: 240px;
height: 260px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="jquery.jTube.js" charset="utf-8"></script>
<script type="text/javascript">
$(function() {
$.jTube({
user: "twofivethreetwo",
limit: 10,
page: 1,
success: function(videos) {
$(videos).each(function() {
$('#myVideos').append('<li><a href="'+this.link+'"><img src="'+this.thumbnail+'"><br>'+this.title+'</a> - '+this.length+'</li>');
});
},
error: function(error) {
alert(error);
}
});
$.jTube({
search: "splinter cell",
limit: 10,
page: 1,
success: function(videos) {
$(videos).each(function() {
$('#myVideos2').append('<li><a href="'+this.link+'"><img src="'+this.thumbnail+'"><br>'+this.title+'</a> - '+this.length+'</li>');
});
},
error: function(error) {
alert(error);
}
});
$.jTube({
feed: 'top_rated',
limit: 10,
page: 1,
success: function(videos) {
$(videos).each(function() {
$('#myVideos3').append('<li><a href="'+this.link+'"><img src="'+this.thumbnail+'"><br>'+this.title+'</a> - '+this.length+'</li>');
});
},
error: function(error) {
alert(error);
}
});
$.jTube({
playlist: 'D92C6F7092127B48',
limit: 10,
page: 1,
success: function(videos) {
$(videos).each(function() {
html = '<li>';
html += '<a href="'+this.link+'">'+this.title+'</a> - '+this.length+'';
html += $.jTubeEmbed(this.video, {width: 240, height: 200});
html += '</li>';
$('#myVideos4').append(html);
});
},
error: function(error) {
alert(error);
}
});
$.jTube({
user: "defvayne23",
userType: 'playlists',
limit: 10,
page: 1,
success: function(videos) {
$(videos).each(function() {
$('#myVideos5').append('<li class="small"><a href="'+this.link+'">'+this.title+'</a></li>');
});
},
error: function(error) {
alert(error);
}
});
$.jTube({
user: "twofivethreetwo",
userType: 'subscriptions',
limit: 10,
page: 1,
success: function(videos) {
$(videos).each(function() {
$('#myVideos6').append('<li class="small"><a href="'+this.link+'"><img src="'+this.thumbnail+'"><br>'+this.title+'</a></li>');
});
},
error: function(error) {
alert(error);
}
});
$.jTube({
user: "adultswim",
userType: 'contacts',
limit: 10,
page: 1,
success: function(contacts) {
$(contacts).each(function() {
if(this.status == 'accepted') {
$('#myVideos7').append('<li class="small"><a href="'+this.link+'">'+this.username+'</a></li>');
}
});
},
error: function(error) {
$('#myVideos7').html(error);
}
});
});
</script>
</head>
<body>
<h2>Videos by 'twofivethreetwo':</h2>
<ul id="myVideos" class="videos"></ul>
<h2>Search videos for 'splinter cell':</h2>
<ul id="myVideos2" class="videos"></ul>
<h2>Video feed for 'top rated':</h2>
<ul id="myVideos3" class="videos"></ul>
<h2>Video feed for my playlist 'Music' (D92C6F7092127B48):</h2>
<ul id="myVideos4" class="videos large"></ul>
<h2>Video playlists for `defvayne23`:</h2>
<ul id="myVideos5" class="videos"></ul>
<h2>Video subscriptions for `twofivethreetwo`:</h2>
<ul id="myVideos6" class="videos"></ul>
<h2>Contacts for `adultswim`:</h2>
<ul id="myVideos7" class="videos"></ul>
</body>
</html>