beets/beets.js
Adrian Sampson b8b8c45e7c use real Twitter badge
I was using a hacked-together API hit before. This won't work with Twitter's
recently-announced API v1.1, which prohibits unauthenticated access.
2012-08-22 14:04:36 -07:00

28 lines
1,019 B
JavaScript

var INTERVAL_INITIAL = 7000;
var INTERVAL_SUBSEQUENT = 5000;
var BEETS_IS = [
'the media library management system for obsessive-compulsive music geeks',
'an infinitely flexible automatic metadata corrector and file renamer',
'the best command-line tool for viewing, querying, and renaming your music collection',
'an album art downloader, lyrics fetcher, and genre identifier',
'a simple music metadata inspection and modification tool for tons of audio file types',
'an MPD-compatible music player',
'a Web-based collection explorer and HTML5 music player',
];
// Cycle "Beets is..." text.
var beetsisIndex = 0;
function updateBeetsis() {
beetsisIndex++;
if (beetsisIndex >= BEETS_IS.length)
beetsisIndex = 0;
var message = BEETS_IS[beetsisIndex] + '.';
$('#beetsis').fadeOut(function() {
$(this).text(message).fadeIn();
setTimeout(updateBeetsis, INTERVAL_SUBSEQUENT);
});
}
$(function() {
setTimeout(updateBeetsis, INTERVAL_INITIAL);
});