YouTube Mini Audio Player
If you read my personal blog (which a lot of you probably don’t even know exists) you’ll commonly see music embedded as mini-YouTube embeds. It turns out, the magic height is 25 pixels, and the magic width (for play/pause and mute) is 62 pixels.
However, it is kind of a burden to do this every time you want to embed a mini player (you have to edit at four fields in the HTML!) So to simplify this process, I, like any programmer before me, created a generator. Just type in the URL to the YouTube video and press make, and you’ll get a preview as well as the cross-browser HTML-esque mess of a code to embed.
Of course, if you’re truly lazy, just drag the bookmarklet below to your bookmark bar in your web browser, and click it on any YouTube video and you’ll be taken to the page with the code already generated.
Source code is available via link at the bottom of the page.
JavaScript: Changes to the Simple Twitter Feed
Recently, I had resumed working on the Simple Twitter Feed, and decided to make some improvements after reading Dave Winer's "What am I up to?" post.
So, the Simple Twitter Feed has one fix, and four additional optional parameters.
| start | STR - Symbol or Text to look for at the beginning of a post |
| time | BOOL - Whether or not to display the "about x minutes ago" |
| client | BOOL - Whether or not to display the "from x" |
| br | BOOL - Whether or not to place a break between the tweet and the extra data |
The simple fix is that the count parameter would check the last (x) amount of tweets, whereas now it displays up to (x) amount of tweets.
JavaScript: Simple Twitter Feed
This is code that I will kindly let anyone use. It only works with public twitter accounts, however, but it is perfect for placing on any web page.
First we have the Inclusion of the File (can only be included once per page). Then the HTML for where the Twitter Feed is going to go, and then the JavaScript to include the file.
<script type="text/javascript" src="http://www.gtaero.net/twitter/twitter.php?user=USERNAME"></script> <div id="twitFeed">Optional Placeholder Text</div> <script type="text/javascript">twitter2id("twitFeed");</script>
Feel free to use this code anywhere you want to. It is my gift to you!
UPDATE: Some additional (optional) variables have been added to the script for further tweaking.
February 24, 2008.
UPDATE: Support for twitter lists and turled profiles has been added to the script. Your script might break with these changes, please view the post for more information.
October 30, 2009.


