Skip to content

Commit

Permalink
Merge pull request #250 from mrpoptart/hearthisat
Browse files Browse the repository at this point in the history
Add support for hearthis.at
  • Loading branch information
feedbee authored Dec 17, 2017
2 parents 01b3d23 + 07f7135 commit 87022a1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ when you're listening to music on various streaming websites.
* Gaana.com
* Google Play Music
* Groove Music
* HearThis.at
* Hype Machine
* iloveradio.de
* Jamstash
Expand Down
17 changes: 17 additions & 0 deletions extension/keysocket-hearthis.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
keySocket.init(
"hearthis",
{
"play-pause": function(){
if(document.querySelector(".play_track").className.search(/hidden/) > 0) {
document.querySelector('.fa-pause').click()
} else {
document.querySelector('.fa-play').click()
}
},
"next": function(){
document.querySelector('.fa-fast-forward').click()
}
// prev is omitted
// stop is omitted
}
);
4 changes: 4 additions & 0 deletions extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
"matches": ["*://music.microsoft.com/*"],
"js": ["plugin-api.js", "keysocket-groovemusic.js"]
},
{
"matches": ["*://hearthis.at/*"],
"js": ["plugin-api.js", "keysocket-hearthis.js"]
},
{
"matches": ["*://hypem.com/*"],
"js": ["plugin-api.js", "keysocket-hypem.js"]
Expand Down

0 comments on commit 87022a1

Please sign in to comment.