Request.LatestGithub is a Plugin MooTools which allows you to display latest public repos or all the projects from any user GitHub as a widget by expanding the class Request.JSONP from MooTools More.
First you must to include the JS files in the head of your HTML document.
#HTML <script type="text/javascript" src="mootools-core.js"></script> <script type="text/javascript" src="JSONP.js"></script> <script type="text/javascript" src="Request.LatestGitHub.js"></script>
In your JS.
#JS window.addEvent('domready',function(){ //#example 1 var git = new Request.GitHub({ onSuccess: function(badge) { document.id('gh').set('html', badge); }, onRequest: function() { document.id('gh').set('text', 'Loading...'); } }); //call latest 3 projects from jquery github git.load('jquery',3); //#example 2 //call latest 3 projects from mootools github document.id('gh2').loadLatestGitHub('mootools',3); });
In your HTML.
#HTML <div id="gh"></div> <div id="gh2"></div>
You can view in action:
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus