-
-
Save jasonalderman/5127473 to your computer and use it in GitHub Desktop.
Quick-and-dirty bookmarklet for enabling spacebar and left/right arrow keys on Amazon Cloud Player. (Being quick-and-dirty, it only works after you've started playing an album or playlist.)
This file contains hidden or 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
javascript:amznJQ.jQuery('body').bind('keyup',function(e){var p=amznMusic.widgets.player,k=amznJQ.jQuery.ui.keyCode;switch(e.which){case k.SPACE: p.playHash('togglePlay'); break; case k.LEFT: p.playHash('previous'); break; case k.RIGHT: p.playHash('next'); break;}}); | |
This file contains hidden or 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
amznJQ.jQuery('body').bind('keyup',function(e){ | |
var p=amznMusic.widgets.player, | |
k=amznJQ.jQuery.ui.keyCode; | |
switch(e.which){ | |
case k.SPACE: | |
p.playHash('togglePlay'); | |
break; | |
case k.LEFT: | |
p.playHash('previous'); | |
break; | |
case k.RIGHT: | |
p.playHash('next'); | |
break; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment