Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'Bassoon08/master' into original
# Conflicts: # README.md # extension/manifest.json
- Loading branch information
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
function onKeyPress(key) { | ||
if (key === NEXT) { | ||
var nextButton = document.getElementById('player-next-button'); | ||
var nextButton = document.querySelector('.pct-player-prev'); | ||
simulateClick(nextButton); | ||
} else if (key === PLAY) { | ||
var playPauseButton = document.getElementById('player-play-button'); | ||
simulateClick(playPauseButton); | ||
var playPauseButton = document.querySelector('.pct-player-play'); | ||
var pausePauseButton = document.querySelector('.pct-player-pause'); | ||
playPauseButton && simulateClick(playPauseButton) || simulateClick(pausePauseButton); | ||
} else if (key === PREV) { | ||
var backButton = document.getElementById('player-previous-button'); | ||
var backButton = document.querySelector('.pct-player-next'); | ||
simulateClick(backButton); | ||
} | ||
} |