Skip to content

Instantly share code, notes, and snippets.

@jasonalderman
Last active December 14, 2015 18:09
Show Gist options
  • Save jasonalderman/5127473 to your computer and use it in GitHub Desktop.
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.)
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;}});
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