Created
May 17, 2011 09:26
-
-
Save salomvary/976199 to your computer and use it in GitHub Desktop.
get Castro Bistro (Budapest) daily menu
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<meta http-equiv="Content-type" content="text/html;charset=utf-8"/> | |
</head> | |
<body> | |
<pre id="out"></pre> | |
<script src="http://connect.facebook.net/en_US/all.js"></script> | |
<script> | |
var query = FB.Data.query('SELECT message, created_time FROM stream'+ | |
' WHERE source_id={0} AND actor_id={0} LIMIT 5',122722877774278) | |
isMenu = /hétfő|kedd|szerda|csütörtök|péntek/i; | |
query.wait(function(rows) { | |
for(var i=0; i<rows.length; i++) { | |
if(isMenu.test(rows[i].message)) { | |
document.getElementById('out').innerHTML = | |
rows[i].message + '\n(' + new Date(parseInt(rows[i].created_time)*1000) + ')'; | |
break; | |
} | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment