1 function load_activity(feedurl, divid) {
2 var yqlURL = "https://query.yahooapis.com/v1/public/yql";
3 var yqlQS = "?q=select%20entry%20from%20xml%20where%20url%20%3D%20'";
4 var yqlOPTS = "'%20limit%2010&format=json&callback=";
5 var container = document.getElementById(divid);
6 var url = yqlURL + yqlQS + encodeURIComponent(feedurl) + yqlOPTS;
8 $.getJSON(url, function(data){
9 var result = data.query.results;
12 if (result==null) return;
13 for (var i = 0; i < result.feed.length; i++) {
14 var entry = result.feed[i].entry;
15 if (entry.title.indexOf("git commit") != -1)
18 if (loaded > nb_display)
20 var div = document.createElement("p");
21 var link = document.createElement("a");
22 var d = new Date(entry.published);
23 var data = '[' + d.toLocaleDateString() + '] ' + entry.title
24 var text = document.createTextNode(data);
25 link.appendChild(text);
26 link.title = entry.title;
27 link.href = entry.link.href;
28 div.appendChild(link);
29 container.appendChild(div);
31 var empty = nb_display - loaded;
32 for (var i = 0; i < empty; i++) {
33 container.appendChild(document.createElement("p"));
38 function google_analytics() {
39 var _gaq = _gaq || [];
40 _gaq.push(['_setAccount', 'UA-21761074-1']);
41 _gaq.push(['_setDomainName', 'none']);
42 _gaq.push(['_setAllowLinker', true]);
43 _gaq.push(['_trackPageview']);
45 var ga = document.createElement('script');
46 ga.type = 'text/javascript';
48 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
49 var s = document.getElementsByTagName('script')[0];
50 s.parentNode.insertBefore(ga, s);
53 function showTooltip(elem, msg) {
54 elem.setAttribute('class', 'btn tooltipped tooltipped-s');
55 elem.setAttribute('aria-label', msg);
58 var clipboard = new Clipboard('.btn');
61 $('[data-toggle="tooltip"]').tooltip()
64 clipboard.on('success', function(e) {
66 $(e.trigger).tooltip('show');
70 $('a[href*=\\#]:not([href=\\#])').click(function() {
71 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
72 var target = $(this.hash);
73 target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
75 $('html,body').animate({
76 scrollTop: target.offset().top
84 jQuery(document).ready(function($) {
85 var url = window.location.href;
86 // Get the basename of the URL
87 url = url.split(/[\\/]/).pop()
88 $('.nav a[href="/' + url + '"]').parent().addClass('active');
90 load_activity("http://buildroot-busybox.2317881.n4.nabble.com/Buildroot-busybox-ft2.xml", "mailing-list-activity");
91 load_activity("http://git.buildroot.org/buildroot/atom/?h=master", "commit-activity");
93 $('#slides').html('<iframe src="https://docs.google.com/gview?url=http://free-electrons.com/doc/training/buildroot/buildroot-slides.pdf&embedded=true" style="position:absolute; width:100%; height:100%; top:0; left:0;" frameborder="0"></iframe>')