#github script. (function() { $.ajax({ url: '/api/github', type: 'GET' }).done( function(data) { var github = document.createElement('div'); $(github).html('
Open GitHub Issues:
' + data.issues + ' (create one)
Open Pull Requests:
' + data.pulls + ' (create one)
').prependTo($('#github')) } ); })();