Created
April 12, 2011 05:22
-
-
Save tapichu/914981 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function( exports, imports ) { | |
return imports( function | |
( run | |
, node$listen | |
, node$fs | |
, route | |
, html | |
, head | |
, sleep | |
) { | |
with ( html ) return run | |
() | |
( node$listen, 0xFAB ) | |
( route, /^\/init/ ) | |
( "(" ) | |
( client.toString() ) | |
( ")()" ) | |
() | |
( route, /^\/jquery\.js/ ) | |
( node$fs ) | |
( __dirname ) | |
( "/jquery.js" ) | |
() | |
() | |
( route, /^\/listen/ ) | |
( sleep, 2000 ) | |
() | |
( route, /^\/focused/ ) | |
( "$('body').html('" ) | |
( head.headers[ "user-agent" ] ) | |
( "');" ) | |
() | |
( HTML ) | |
( BODY, { style: 'font: bold 5em helvetica' } ) | |
( SCRIPT, { src: '/jquery.js' } ) | |
() | |
( SCRIPT, { src: '/init' } ) | |
() | |
() | |
() | |
(); | |
}); | |
}; | |
var client = function() { | |
( function listen(){ $.getScript( "/listen", listen ) } )(); | |
$( window ) | |
.focus( function(){ $.getScript( "/focused" ) } ) | |
.focus(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment