-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
48 lines (41 loc) · 1.81 KB
/
Copy pathscript.js
File metadata and controls
48 lines (41 loc) · 1.81 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
$(document).ready(function () {
if(window.location.hostname == 'vk.com' || window.location.hostname == 'm.vk.com') {
var url, name = '', trek
if ($('#darkvk-minors').length == 1) {
var dark_vk = true;
}
setInterval(function () {
$('.audio_row.audio_row_with_cover._audio_row').each(function (index) {
if (dark_vk == true) {
$(this).css(
{
"background-color": "#000",
"border-left": "2px solid green"
}
)
}
$(this).find('.audio_row__performers a').each(function () {
name += $(this).text() + ' ';
})
trek = $(this).find('.audio_row__title_inner._audio_row__title_inner').text();
url = 'https://open.spotify.com/search/' + name + ' ' + trek
var name_trek = $(this).find('.audio_row__performer_title');
if (name_trek.find('.link_spotify').length == 0) {
name_trek.append(
'<a class="link_spotify" target="_blank" href="' + encodeURI(url) + '" ' +
'style="background: url(https://open.scdn.co/cdn/images/favicon32.a19b4f5b.png) center/cover no-repeat; ' +
'width: 16px; height: 16px;' +
'right: 0;' +
'position: absolute;' +
'top: 50%;' +
'margin-top: -8px;' +
'z-index: 9999999999999999;' +
'text-decoration: none;' +
'"></a>'
)
}
name = ''
})
}, 1000)
}
})