samhuri.net/proj/index.html
2010-11-28 23:10:13 -08:00

127 lines
4 KiB
HTML

<!doctype html>
<head>
<meta charset=utf-8>
<meta name=viewport content=width=device-width>
<title>samhuri.net</title>
<link rel=stylesheet href=../style.css>
<style>
#gh { text-align: center }
#gh img { border: none }
span { padding: 5px }
</style>
<script>
var _gaq = _gaq || [];
_gaq.push( ['_setAccount', 'UA-214054-5']
, ['_trackPageview']
);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
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>
<!-- fuck ie -->
<!--[if lt IE 8]>
<script src=http://d1eqzjbvoh1rux.cloudfront.net/json2.min.js></script>
<![endif]-->
<script src=gitter.js></script>
<script src=store.js></script>
<script>
if (typeof console === 'undefined') {
console = {log:function(){}}
}
(function() {
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', ready, false)
} else if (window.attachEvent) { // fuck ie
window.attachEvent('onload', ready)
}
function ready() {
function addClass(el, name) {
var c = el.className || name
if (!c.match(new RegExp('\b' + name + '\b', 'i'))) c += ' ' + name
}
var body = document.getElementsByTagName('body')[0]
, text
if ('innerText' in body) {
text = function(id, text) {
document.getElementById(id).innerText = text
}
} else {
text = function(id, text) {
document.getElementById(id).textContent = text
}
}
function highlight(id) {
document.getElementById(id).style.className = ' highlight'
}
function textHighlight(id, t) {
text(id, t)
document.getElementById(id).className = ' highlight'
}
function updateN(name, things) {
textHighlight('n' + name, things.length)
}
var data = createObjectStore('proj')
, t = data.get('t-proj')
, names = ['followers', 'following', 'repos', 'watched']
if (!t || +new Date() - t > 86400000) {
console.log('stale ' + String(t))
data.set('t-proj', +new Date())
names.forEach(function(name) {
GITR[name]('samsonjs', function(err, things) {
if (err) {
text('n' + name, '?')
} else {
data.set(name, things)
updateN(name, things)
}
})
})
} else {
console.log('hit ' + t + ' (' + (+new Date() - t) + ')')
names.forEach(function(name) {
updateN(name, data.get(name))
})
}
}
}())
</script>
</head>
<div id=breadcrumbs><a href=../>samhuri.net</a></div>
<a href=https://github.com/samsonjs><img id=forkme src=forkme.png alt="Fork me on GitHub"></a>
<h1>projects</h1>
<ul>
<li><a href=batteries>batteries</a></li>
<li><a href=format>format</a></li>
<li><a href=gitter>gitter</a></li>
<li><a href=repl-edit>repl-edit</a></li>
<li class=last><a href=strftime>strftime</a></li>
</ul>
<p id=gh>
<a class=img href=https://github.com/samsonjs><img src=gh.png alt=GitHub></a>
</p>
<table align=center>
<tr>
<td align=right><span id=nrepos><img src=spinner.gif></span> projects</td>
<td>&mdash;</td>
<td align=left><span id=nfollowers><img src=spinner.gif></span> followers</td>
</tr>
<tr>
<td align=right>watching <span id=nwatched><img src=spinner.gif></span> projects
<td>&mdash;</td>
<td align=left>following <span id=nfollowing><img src=spinner.gif></span> people</td>
</tr>
</table>
<p id=sjs>
<a href=https://twitter.com/_sjs>@_sjs</a>
</p>
<p id=promote-js>
<a class=img href=https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function title='JS Function arity'><img src=http://static.jsconf.us/promotejsh.gif height=150 width=180 alt='JS Function arity'/></a>
</p>