-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathJango.bsstrategy
33 lines (33 loc) · 971 Bytes
/
Jango.bsstrategy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// JangoMedia.plist
// BeardedSpice
//
// Created by Stanislav Sidelnikov on 09/11/15.
// Copyright © 2015 GPL v3 http://www.gnu.org/licenses/gpl.html
//
BSStrategy = {
version:1,
displayName:"Jango",
accepts: {
method: "predicateOnTab",
format:"%K LIKE[c] '*jango.com*'",
args: ["URL"]
},
isPlaying: function () { return (document.querySelector('#btn-playpause.pause') != null);},
toggle: function () {document.querySelector('a#btn-playpause').click()},
next: function () {document.querySelector('a#btn-ff').click()},
previous: function () {},
favorite: function () {},
pause:function () {
var e = document.querySelector('a#btn-playpause.pause');
if(e != null) { e.click(); }
},
trackInfo: function () {
return {
'track': $('#current-song')[0].innerText,
'artist': $('#player_current_artist a')[0].innerText,
'favorited': false,
'image': $('#player_main_pic_img').attr('src')
};
}
}