Created
May 27, 2013 15:56
-
-
Save g-r-a-v-e-l-y/5657772 to your computer and use it in GitHub Desktop.
A very silly full screen "most recent tweet" gag.
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Devops Wisdom</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script> | |
function GetLastTweet(UserName) { | |
url = 'http://api.twitter.com/1/statuses/user_timeline/' + UserName + '.json?callback=?'; | |
$.getJSON(url, function (tweet) { | |
$("#tweet").html(tweet[0].text); | |
}); | |
} | |
function GetProfileImage(UserName) { | |
url = 'http://api.twitter.com/1/statuses/user_timeline/' + UserName + '.json?callback=?'; | |
$.getJSON(url, function (image) { | |
$("#ProfileImage").attr('src', image[0].user.profile_image_url); | |
}); | |
} | |
</script> | |
<style> | |
h1{ | |
font-size: 5em; | |
font-family: Pragmata, Menlo, 'DejaVu LGC Sans Mono', 'DejaVu Sans Mono', Consolas, 'Everson Mono', 'Lucida Console', 'Andale Mono', 'Nimbus Mono L', 'Liberation Mono', FreeMono, 'Osaka Monospaced', Courier, 'New Courier', monospace; | |
} | |
img{ | |
position: fixed; | |
top: 1em; | |
left: 1em; | |
} | |
#tweet{ | |
position: fixed; | |
top: -.5em; | |
left: 4.5em; | |
} | |
</style> | |
</head> | |
<body onload="GetLastTweet('devops_borat'); GetProfileImage('devops_borat')"> | |
<img id="ProfileImage" /> | |
<h1 id ="tweet"> | |
</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment