This repository has been archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
thank-you.html
587 lines (587 loc) · 27.4 KB
/
thank-you.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
<!DOCTYPE html>
<!-- This site was created in Webflow. http://www.webflow.com -->
<!-- Last Published: Thu Oct 12 2017 16:19:19 GMT+0000 (UTC) -->
<html data-wf-page="58e2271fb58087a679be8da3" data-wf-site="580f85cc654a49247bcabbe4">
<head>
<meta charset="utf-8">
<title>Thank you for contacting us</title>
<meta content="... and for helping bring physical activity into the digital age" name="description">
<meta content="Thank you for contacting us" property="og:title">
<meta content="... and for helping bring physical activity into the digital age" property="og:description">
<meta content="summary" name="twitter:card">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="Webflow" name="generator">
<link href="css/normalize.css" rel="stylesheet" type="text/css">
<link href="css/webflow.css" rel="stylesheet" type="text/css">
<link href="css/openactive-dev-leeds.webflow.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js" type="text/javascript"></script>
<script type="text/javascript">WebFont.load({ google: { families: ["Open Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic","Montserrat:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic","Roboto:300,regular,500"] }});</script>
<!-- [if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif] -->
<script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script>
<link href="images/openactive-badge-large-2_1.png" rel="shortcut icon" type="image/x-icon">
<link href="images/openactive-badge-large-2.png" rel="apple-touch-icon">
<script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-66225810-1'], ['_trackPageview']);(function() { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js" type="text/javascript"></script>
<style>
body {
color: black;
}
/* Making site wider */
@media screen and (min-width: 1024px) {
.w-container {
max-width: 1000px;
}
}
@media screen and (min-width: 1600px) {
.hero-section.centered {
padding-top: 160px;
padding-bottom: 160px;
}
}
</style>
<script>
window['_fs_debug'] = false;
window['_fs_host'] = 'www.fullstory.com';
window['_fs_org'] = '2D3YE';
window['_fs_namespace'] = 'FS';
(function(m,n,e,t,l,o,g,y){
if (e in m && m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'); return;}
g=m[e]=function(a,b){g.q?g.q.push([a,b]):g._api(a,b);};g.q=[];
o=n.createElement(t);o.async=1;o.src='https://'+_fs_host+'/s/fs.js';
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
g.identify=function(i,v){g(l,{uid:i});if(v)g(l,v)};g.setUserVars=function(v){g(l,v)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(c,d,i){if(!c || document.cookie.match('fs_uid=[`;`]*`[`;`]*`[`;`]*`')){
d=n.domain;while(1){n.cookie='fs_uid=;domain='+d+
';path=/;expires='+new Date(0).toUTCString();i=d.indexOf('.');if(i<0)break;d=d.slice(i+1)}}};
})(window,document,window['_fs_namespace'],'script','user');
</script>
<!-- Begin Cookie Consent plugin - https://cookieconsent.insites.com/ -->
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css">
<style>
.cc-theme-block {
border: 3px solid #333;
}
.cc-btn {
text-decoration: none;
font-family: Montserrat, sans-serif;
letter-spacing: 2px;
text-transform: uppercase;
font-weight: 300;
font-size: 16px;
border-radius: 0px;
}
.cc-btn:hover {
background-color: "#2e9dff";
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#ffffff",
"text": "#000000",
},
"button": {
"background": "#00b6ff",
"text": "#ffffff"
}
},
"theme": "block",
"position": "bottom-right",
"content": {
"message": "We use cookies to ensure that we give you the best experience on our website.",
"dismiss": "Continue",
"href": "privacy-policy.html"
},
"blacklistPage": [/.*blog.*/],
"dismissOnTimeout": 10000,
"dismissOnScroll": 20
})});
</script>
<!-- End Cookie Consent plugin -->
</head>
<body>
<div data-collapse="medium" data-animation="default" data-duration="400" class="navigation-bar w-nav">
<div class="w-container">
<a href="index.html" target="_top" class="brand-link w-nav-brand">
<h1 class="brand-text main-logo">OpenActive</h1>
</a>
<nav role="navigation" class="navigation-menu w-nav-menu"><a href="index.html" target="_top" class="navigation-link w-nav-link">Home</a><a href="technology.html" target="_top" class="navigation-link w-nav-link">Open your data</a><a href="use-data.html" target="_top" class="navigation-link w-nav-link">Use data</a><a href="learn.html" target="_top" class="navigation-link w-nav-link">Learn about data</a><a href="w3c-community-group.html" target="_top" class="navigation-link w-nav-link">Data standards</a><a href="participate.html" target="_top" class="hidden navigation-link w-nav-link">Resources</a><a href="https://blog.openactive.io" target="_top" class="navigation-link w-nav-link">Blog</a><a href="pioneers.html" target="_top" class="navigation-link w-nav-link">Who's involved?</a><a href="ignore-template-originals/faq.html" target="_top" class="hidden navigation-link w-nav-link">FAQ</a><a href="join.html" target="_top" class="navigation-link w-nav-link">Join us</a></nav>
<div class="hamburger-button w-nav-button">
<div class="w-icon-nav-menu"></div>
</div>
</div>
</div><a href="https://github.com/openactive/activation" target="_blank" class="github-forkme w-hidden-medium w-hidden-small w-hidden-tiny w-inline-block"></a>
<div class="join-us-hero-image short"></div>
<div class="section">
<div class="w-container">
<div class="section-title-group">
<div class="form-success">
<div class="w-row">
<div class="success-image w-col w-col-2"><img src="images/mailing.png" width="70"></div>
<div class="w-col w-col-10">
<h3 class="home-header success">Check your inbox</h3>
<p class="success-message">Thank you! Please click the link in the e-mail we've just sent you to confirm your e-mail address.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="footercta w-container">
<div class="w-row">
<div class="spc w-col w-col-6">
<h5 class="home-header">About OpenActive</h5>
<p class="home-body left-align">We are a group of organisations who believe that open data will help people get active, coordinated by the <a target="_blank" href="http://opendata.institute">Open Data Institute</a>.</p>
<div class="twitter-footer w-widget w-widget-twitter"><iframe src="https://platform.twitter.com/widgets/follow_button.html#screen_name=openactiveio&show_count=false&size=l&show_screen_name=true&dnt=true" scrolling="no" frameborder="0" allowtransparency="true" style="border: none; overflow: hidden; width: 100%; height: 28px;"></iframe></div>
</div>
<div class="spc w-col w-col-6">
<h5 class="home-header">Contact</h5>
<p class="home-body left-align">We'd love to hear from you. Get in touch at <a href="mailto:[email protected]">[email protected]</a>.<br><br>Want to be kept informed of all that's happening? <a href="subscribe.html">Subscribe to our monthly update</a>.</p>
<div class="w-hidden-main w-hidden-medium w-hidden-small w-hidden-tiny">
<p class="home-body">Want to be kept up to date on all that's happening?</p>
<div class="email-form-wrapper w-form">
<form id="email-form" name="email-form" data-name="Email Form" class="email-form">
<div class="w-row">
<div class="w-col w-col-9"><input type="email" id="email" name="email" data-name="Email" placeholder="Enter your email address" maxlength="256" required="" class="inputfield w-input"></div>
<div class="button-column w-col w-col-3"><input type="submit" value="Submit" data-wait="Please wait..." class="buttonsubmit w-button"></div>
</div>
</form>
<div class="w-form-done">
<p>Thank you! Your submission has been received!</p>
</div>
<div class="w-form-fail">
<p>Oops! Something went wrong while submitting the form</p>
</div>
</div>
</div>
</div>
</div><a href="join.html" class="button button-left footer-joinus">Join us</a></div>
</div>
<div alt="Creative Commons License" class="center footer">
<div class="w-container">
<div class="footer-text">
<p>Supported by the <a href="http://theodi.org/" class="footer-link-2">Open Data Institute</a> and <a href="https://www.sportengland.org/" class="footer-link-2">Sport England</a></p>
</div><img src="images/odi_logo_white.png" class="odi-logo"><img src="images/Sport-England-Logo-White-RGB.png" height="64" class="odi-logo"></div>
<div class="w-container">
<div class="footer-text">
<p class="icon-attribution">With the exception of icons and images, this work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" class="footer-link-2">Creative Commons Attribution-ShareAlike 4.0 International Licence</a>. All source code is licensed under
<a target="_blank" href="http://www.gnu.org/licenses/gpl-3.0.en.html" class="footer-link-2">GNU GPL v3</a>.<span class="hidden"> <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.flaticon.com" class="footer-link-2">Icons made by Freepik</a> and are licensed under CC BY 3.0.</span> Photography by <a href="https://www.flickr.com/photos/astronomyblog/" class="footer-link-2">Stuart Lowe</a> (CC-BY-SA 4.0), London Sport/Greg Keegan, <a href="https://www.flickr.com/photos/pigpilot/7575753458/" class="footer-link-2">Stuart Grout</a> (CC-BY 2.0), <a href="https://www.flickr.com/photos/footfun/2469722745/" class="footer-link-2">Evan Lovely</a> (CC-BY 2.0). Icons made by <a href="http://www.flaticon.com/authors/pixel-buddha" target="_blank" class="footer-link-2">Pixel Buddha</a> from <a href="http://www.flaticon.com" target="_blank" class="footer-link-2">www.flaticon.com</a> is licensed by <a target="_blank" href="http://creativecommons.org/licenses/by/3.0/" class="footer-link-2">CC 3.0 BY</a>.<br><br><a href="privacy-policy.html" class="footer-link-2">Privacy and Cookie Policy</a></p>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js" type="text/javascript"></script>
<script src="js/webflow.js" type="text/javascript"></script>
<!-- [if lte IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/placeholders/3.0.2/placeholders.min.js"></script><![endif] -->
<script>
var scroller;
function loadJSON(url, cb) {
$.support.cors = true;
$.getJSON(url, function(data) {
cb(data);
}).fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error;
console.log( "Error accessing GitHub: " + err );
});
}
function gitHubGetForks(success) {
var url = 'https://api.github.com/repos/openactive/dataset-site-generator/forks?sort=stargazers';
loadJSON(url, function (jsonBody) {
success(jsonBody);
});
}
function addRow(metadata) {
console.log("Metadata for!: " + metadata["dataset-site-url"] );
createRow("#data-user-section-list",
metadata["dataset-site-url"] + "images/logo.png",
metadata["dataset-site-url"],
metadata["title"],
metadata["description"]);
}
function createRow(appendId,image,link,title,description) {
var newRow = $( "#row-template" ).clone();
newRow.removeAttr("id");
newRow.find( "[data-field='image']" ).attr("src", image);
newRow.find( "[data-field~='link']" ).attr("href", link);
newRow.find( "[data-field~='title']" ).text(title);
newRow.find( "[data-field='description']" ).text(description);
//Add row to list
newRow.appendTo( appendId );
newRow.show();
}
function updateCommunityList(data) {
if (data["community"]) {
var map = data.community;
var keys = Object.keys(map);
var len = keys.length;
keys.sort();
for (var i = 0; i < len; i++) {
var k = keys[i];
var v = map[k];
createRow("#pioneers-section-list",
"/community-members/logos/" + v.image,
v.url,
v.name,
v.description);
}
$( "#metric-community" ).text(len);
}
}
function setupScrolling() {
if ( $( "#scrolltoggle" ).length ) {
// Now that logos are created, add scrolling logo code
function ScrollingList(el){
if(el.length == 1){
this.el = el;
this.el.find('#row-template').remove();
this.logos = this.el.find('.promo-box');
this.n = this.logos.length;
this.w = 255;
this.h = this.logos.outerHeight(true);
// Get the container of the list
this.container = this.el.parent();
// Full width (all the logos in a line)
this.fw = (this.w*this.n);
this.ani;
this.scrolling = false;
this.l2r = true;
this.container.on('mouseover',{me:this},function(e){ e.data.me.pause(); } );
this.container.on('mouseout',{me:this},function(e){ e.data.me.scroll(); } );
this.on();
}
return this;
}
ScrollingList.prototype.on = function(){
// Explicitly define the logo width
this.logos.css({'width':this.w+'px'});
// Set the logo block width
this.el.css({'width':this.fw+'px'});
this.container.css({'width':'100%','max-width':'100%','height':this.h+'px','overflow':'hidden'});
this.logos.css({'float':'none','display':'inline-block'});
// The list width
this.lw = parseInt(this.container.css('width'));
this.scroll();
return this;
}
ScrollingList.prototype.off = function(){
this.container.stop();
this.container.scrollLeft(0);
// Zap all set styles
this.container.css({'width':'','max-width':'','height':'','overflow':''});
this.el.css({'width':''});
this.logos.css({'float':'','display':'','width':''});
return this;
}
ScrollingList.prototype.pause = function(){
if(this.scrolling){
this.container.stop();
this.scrolling = false;
}
return this;
}
ScrollingList.prototype.reverse = function(){
this.l2r = !this.l2r;
return this;
}
ScrollingList.prototype.scroll = function(){
if(!this.scrolling){
this.scrolling = true;
var t = 1200 * this.n;
var f = (this.l2r) ? (1 - (this.container.scrollLeft()/this.fw)) : (this.container.scrollLeft()/this.fw);
var left = (this.l2r) ? (this.w*this.n - this.lw) : 0;
var _obj = this;
this.ani = this.container.animate({ scrollLeft: left+'px'}, t*f, "linear",function(){ _obj.reverse(); _obj.scroll(); });
return this;
}
}
scroller = new ScrollingList($('#pioneers-section-list'));
$('#scrolltoggle').clickToggle(function() {
scroller.off();
},
function() {
scroller.on();
});
if($('#pioneers-section-list').length == 1){
// Get the logos
var logos = $('#pioneers-section-list .promo-box');
var n = logos.length;
// Get width of an individual logo
var w = 255;//parseInt(logos.css('width'));
// Get height of an individual logo
var h = parseInt(logos.css('height'));
logos.css({'float':'none','display':'inline-block'});
var list = $('#pioneers-section-list').parent();
// Full width
var fw = (w*n);
var lw = parseInt(list.css('width'));
// Explicitly define the list width
list.css({'width':lw+'px','height':h+'px','overflow':'hidden'});
// Explicitly define the logo width
logos.css({'width':w+'px'});
// Set the logo block height
$('#pioneers .w-dyn-items').css({'width':fw+'px'});
var ani;
var l2r = true;
list.on('mouseover',function(e){ list.stop(); } );
list.on('mouseout',function(e){ scroll(); } );
function scroll(){
var t = 1200 * n;
var f = (l2r) ? (1 - (list.scrollLeft()/fw)) : (list.scrollLeft()/fw);
var left = (l2r) ? (w*n - lw) : 0;
ani = list.animate({ scrollLeft: left+'px'}, t*f, "linear",function(){
l2r = !l2r;
scroll();
});
}
scroll();
}
}
}
/*
* On Page Load
*/
$(function() {
$.fn.clickToggle = function(func1, func2) {
var funcs = [func1, func2];
this.data('toggleclicked', 0);
this.click(function() {
var data = $(this).data();
var tc = data.toggleclicked;
$.proxy(funcs[tc], this)();
data.toggleclicked = (tc + 1) % 2;
});
return this;
};
$( "#data-user-section-list" ).each(function() {
$( "#row-template" ).hide();
$.getJSON( "/datasets/directory.json", function( body ) {
for(var i = 0; i < body.length; i++) {
var metadata = body[i];
console.log("Metadata for: " + metadata["dataset-site-url"] + " (Publish: " + metadata["publish"] + ")");
if (metadata["publish"]) {
addRow(metadata);
}
}
});
});
$( "#pioneers-section-list" ).each(function() {
$( "#row-template" ).hide();
$.getJSON("/community-members/community.json", function (data) {
//Only continue if load successful, ignore failure
console.log("Got community list!");
updateCommunityList(data);
setupScrolling();
});
});
$( "#slide-button" ).contextmenu(function (e) {
window.location.href = '/participate.html';
return false;
});
});
$(function() {
$(".marked").each(function() {
var element = $( this );
var id = element.attr('id');
console.log("HI " + id);
$.get( "https://raw.githubusercontent.com/openactive/" + id + "/master/README.md", function( data ) {
var dataSansHeader = data.replace(/[\s\S]*?\(\_SNIP\_\)[\s\S][\s\S]/,"");
element.html( marked(dataSansHeader) );
});
});
});
$(function() {
$( "#metric-impl" ).each(function() {
$.getJSON( "https://api.github.com/repos/openactive/users/milestones?state=all", function( data ) {
$( "#metric-impl" ).text(data.length)
});
});
});
$(function() {
$( "#metric-live" ).each(function() {
$.getJSON( "/datasets/directory.json", function( data ) {
$( "#metric-live" ).text(data.length)
});
});
});
</script>
<script>
/******************************************************
* #### jQuery-Youtube-Channels-Playlist v05 ####
* Coded by Ican Bachors 2014.
* http://ibacor.com/labs/jquery-youtube-channels-playlist/
* Updates will be posted to this site.
******************************************************/
$.fn.ycp = function(opt) {
var defaultopt = {
playlist : 10,
autoplay : false,
related : false
};
opt.playlist = (opt.playlist == undefined ? defaultopt.playlist : opt.playlist);
opt.autoplay = (opt.autoplay == undefined ? defaultopt.autoplay : opt.autoplay);
opt.related = (opt.related == undefined ? defaultopt.related : opt.related);
$(this).each(function(i, a) {
var b = ($(this).attr('id') != null && $(this).attr('id') != undefined ? '#' + $(this).attr('id') : '.' + $(this).attr('class')),
channel = $(this).data('ycp'),
html = '<div class="ycp">' + '<div class="unit kenca">' + '<div class="ycp_vid_play" title="Play video"></div>' + '</div>' + '<div class = "unit katuhu">' + '<div id="ycp_youtube_channels' + i + '"></div>' + '</div>' + '</div>';
$(this).html(html);
if(channel.substring(0, 2) == 'PL' || channel.substring(0, 2) == 'UU'){
var pageToken = '';
ycp_list(channel, pageToken, i, b);
}else{
var tipe = (channel.substring(0, 2) == 'UC' ? 'id' : 'forUsername');
ycp_play(channel, tipe, i, b);
}
});
function ycp_play(c, d, e, f) {
$.ajax({
url: 'https://www.googleapis.com/youtube/v3/channels?part=contentDetails&' + d + '=' + c + '&key=' + opt.apikey,
crossDomain: true,
dataType: 'json'
}).done(function(a) {
var b = a.items[0].contentDetails.relatedPlaylists.uploads,
pageToken = '';
ycp_list(b, pageToken, e, f)
})
}
function ycp_list(f, g, k, l) {
$.ajax({
url: 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=' + opt.playlist + '&playlistId=' + f + '&key=' + opt.apikey + '&pageToken=' + g,
dataType: 'json'
}).done(function(c) {
var d = '';
d += '<div class="vid-top">';
d += '</div><div class="vid-bottom">';
$.each(c.items, function(i, a) {
var b = c.items[i].snippet.resourceId.videoId;
ycp_part(b, i, k, l);
d += '<div class="play" data-vvv="' + b + '" data-img="' + c.items[i].snippet.thumbnails.high.url + '" title="' + c.items[i].snippet.title + '"><div class="thumb"><img src="' + c.items[i].snippet.thumbnails.default.url + '" alt=" "><span class="tm' + i + '"></span></div>';
d += '<div class="title">' + c.items[i].snippet.title.replace("OpenActive W3C Community Group Meeting / ", "Group Meeting ") + '</div><span class="mute by' + i + '"></span><br> <!-- <span class="mute views' + i + '"></span><span class="mute">-</span> --> <span class="mute date' + i + '"></span></div>'
});
d += '</div>';
$(l + ' .ycp div#ycp_youtube_channels' + k).html(d);
if (c.prevPageToken == null || c.prevPageToken == undefined) {
var e = $(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play').attr("data-vvv"),
imag = $(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play').attr("data-img");
if(opt.autoplay == false){
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<img src=" ' + imag + '">');
}else{
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<iframe src="https://www.youtube.com/embed/' + e + '?rel=' + (opt.related == true ? 1 : 0) + '&autoplay=1" allowfullscreen="" frameborder="0" class="vid-iframe"></iframe>');
}
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div').removeClass('vid-active');
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play:eq(0)').addClass('vid-active')
} else {
$(l + ' .ycp div#ycp_youtube_channels' + k + ' span.vid-prev').click(function() {
g = c.prevPageToken;
ycp_list(f, g, k, l);
return false
})
}
$(l + ' .ycp div#ycp_youtube_channels' + k + ' span.vid-next').click(function() {
g = c.nextPageToken;
ycp_list(f, g, k, l);
return false
});
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play').each(function() {
$(this).click(function() {
var a = $(this).attr("data-vvv"),
m = $(this).attr("data-img");
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div').removeClass('vid-active');
$(this).addClass('vid-active');
if(opt.autoplay == false){
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<img src=" ' + m + '">');
}else{
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<iframe id="mainplayer" src="https://www.youtube.com/embed/' + a + '?rel=' + (opt.related == true ? 1 : 0) + '&autoplay=1" allowfullscreen="" frameborder="0" class="vid-iframe"></iframe>');
var myVideo = iframe.getElementById('mainplayer');
myVideo.mute();
}
return false
})
});
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').click(function() {
var a = $(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play.vid-active').attr("data-vvv");
$(this).html('<iframe src="https://www.youtube.com/embed/' + a + '?rel=' + (opt.related == true ? 1 : 0) + '&autoplay=1" allowfullscreen="" frameborder="0" class="vid-iframe"></iframe>');
return false
});
})
}
function ycp_part(c, i, d, e) {
$.ajax({
url: 'https://www.googleapis.com/youtube/v3/videos?id=' + c + '&key=' + opt.apikey + '&part=contentDetails,snippet,statistics',
dataType: 'json'
}).done(function(a) {
var b = a.items[0].contentDetails.duration,
dataw = '',
menit = '',
detik = '';
if (b.match(/M/g)) {
dataw = b.split('M');
menit = dataw[0].replace('PT', '');
if (dataw[1] != '') {
detik = dataw[1].replace('S', '')
} else {
detik = '00'
}
} else {
dataw = b.split('PT');
menit = '00';
detik = dataw[1].replace('S', '')
}
$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.tm' + i).html(menit + ':' + detik);
$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.by' + i).html('by ' + a.items[0].snippet.channelTitle);
//$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.views' + i).html(addCommas(a.items[0].statistics.viewCount) + ' views');
$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.date' + i).html(_timeSince(new Date(a.items[0].snippet.publishedAt).getTime()))
})
}
function _timeSince(a) {
var s = Math.floor((new Date() - a) / 1000),
i = Math.floor(s / 31536000);
if (i > 1) {
return i + " years ago"
}
i = Math.floor(s / 2592000);
if (i > 1) {
return i + " months ago"
}
i = Math.floor(s / 86400);
if (i > 1) {
return i + " days ago"
}
i = Math.floor(s / 3600);
if (i > 1) {
return i + " hours ago"
}
i = Math.floor(s / 60);
if (i > 1) {
return i + " minutes ago"
}
return Math.floor(s) + " seconds ago"
}
function addCommas(a) {
a += '';
x = a.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var b = /(\d+)(\d{3})/;
while (b.test(x1)) {
x1 = x1.replace(b, '$1' + ',' + '$2')
}
return x1 + x2
}
}
</script>
<script>
$(function() {
$(".demo").ycp({
apikey : 'AIzaSyAsiDuPedi4rHrCYvXXbCYGxFY3K9_dK_o',
autoplay : false,
related : false
});
});
</script>
</body>
</html>