Skip to content

Commit 87022a1

Browse files
authored
Merge pull request #250 from mrpoptart/hearthisat
Add support for hearthis.at
2 parents 01b3d23 + 07f7135 commit 87022a1

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ when you're listening to music on various streaming websites.
1919
* Gaana.com
2020
* Google Play Music
2121
* Groove Music
22+
* HearThis.at
2223
* Hype Machine
2324
* iloveradio.de
2425
* Jamstash

extension/keysocket-hearthis.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
keySocket.init(
2+
"hearthis",
3+
{
4+
"play-pause": function(){
5+
if(document.querySelector(".play_track").className.search(/hidden/) > 0) {
6+
document.querySelector('.fa-pause').click()
7+
} else {
8+
document.querySelector('.fa-play').click()
9+
}
10+
},
11+
"next": function(){
12+
document.querySelector('.fa-fast-forward').click()
13+
}
14+
// prev is omitted
15+
// stop is omitted
16+
}
17+
);

extension/manifest.json

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
"matches": ["*://music.microsoft.com/*"],
105105
"js": ["plugin-api.js", "keysocket-groovemusic.js"]
106106
},
107+
{
108+
"matches": ["*://hearthis.at/*"],
109+
"js": ["plugin-api.js", "keysocket-hearthis.js"]
110+
},
107111
{
108112
"matches": ["*://hypem.com/*"],
109113
"js": ["plugin-api.js", "keysocket-hypem.js"]

0 commit comments

Comments
 (0)