-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathOdnoklassniki.bsstrategy
36 lines (36 loc) · 1 KB
/
Odnoklassniki.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
34
35
36
//
// Odnoklassniki.plist
// BeardedSpice
//
// Created by Alexander Chuprin on 2/16/2015.
// Copyright (c) 2015 Alexander Chuprin. All rights reserved.
//
BSStrategy = {
version:1,
displayName:"Odnoklassniki",
accepts: {
method: "predicateOnTab",
format:"%K LIKE[c] '*ok.ru*' OR %@ LIKE[c] '*odnoklassniki.ru*'",
args: ["URL", "URL"]
},
toggle: function () {
if (odklMusic.playingTrack() == "") {
if (window['__getMusicFlash']) {
__getMusicFlash().lcResume()
} else {
odklMusic.openAndLaunchMusicPlaying();
}
} else {
__getMusicFlash().lcPause();
}
},
next: function () { __getMusicFlash().lcNext() },
previous: function () { __getMusicFlash().lcPrev() },
pause: function () { __getMusicFlash().lcPause(); },
trackInfo: function () {
return {
'track': document.querySelector('#mmpcw .mus_player_song').firstChild.nodeValue,
'artist': document.querySelector('#mmpcw .mus_player_artist').firstChild.nodeValue
};
}
}