Created
June 20, 2011 23:46
-
-
Save sydlawrence/1036897 to your computer and use it in GitHub Desktop.
turntable.fm dj auto poll
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
var become_active = false; | |
var become_txt = $('<div>Waiting for DJ Slot</div>'); | |
become_txt.css('position','fixed').css('bottom',0).css('left',0).css('z-index',9999).css('color','#fff'); | |
$('body').append(become_txt); | |
var _oldhide = $.fn.hide; | |
$.fn.hide = function(speed, callback) { | |
if ($(this).hasClass('become_dj')) { | |
become_active = false; | |
} | |
return _oldhide.apply(this,arguments); | |
} | |
var _oldshow = $.fn.show; | |
$.fn.show = function(speed, callback) { | |
if ($(this).hasClass('become_dj')) { | |
become_active = true; | |
$('.become_dj').click(); | |
become_txt.html('You should now be dj'); | |
} | |
return _oldshow.apply(this,arguments); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment