var links_pattern var group FF4141 0567CA Админ Модер Мл Модер var lin

 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
var links_pattern = {};
var group = {0: '#FF4141', 1: '#0567CA'}; // 0 - Админ, 1 - Модер, 2 - Мл. Модер
var links = {'https://vk.com/alowir': {group: 1, nick: 'Alowir'}
,'https://vk.com/mikekasadov': {group: 1, nick: 'forse'}
,'https://vk.com/id185729600': {group: 1, nick: 'Kenny13372'}
,'https://vk.com/perbuy_czar': {group: 1, nick: 'Phoenixxx_Czar'}
,'https://vk.com/mmxvv': {group: 1, nick: 'Salamakeykum'}
,'https://vk.com/palenkov2017': {group: 1, nick: '[CM]palenkov'}
,'https://vk.com/hayko.karapetyan': {group: 1, nick: '[CM]ARM25'}
,'https://vk.com/d.mayvis': {group: 1, nick: '[CM]Mayvis'}
,'https://vk.com/ehtlervlone': {group: 1, nick: '[CM]OlegEhtler'}
// Admins
,'https://vk.com/gospodin_buero': {group: 0, nick: 'Artem_Buero'}
,'https://vk.com/shinn0': {group: 0, nick: 'La_Mettrie'}
,'https://vk.com/idsznachitsnake': {group: 0, nick: 'Snake_Firm'}
,'https://vk.com/cm_rafael': {group: 0, nick: '[CM]Рафаэль'}
,'https://vk.com/danya39': {group: 0, nick: 'Ch0c0Cube'}
,'https://vk.com/omg_o_o': {group: 0, nick: '-Masson-'}
,'https://vk.com/genius_cm': {group: 0, nick: 'GеNius'}
,'https://vk.com/id345781250': {group: 0, nick: 'JiM'}};
for (key in links)
{
links_pattern[key] = {group: links[key]['group'], nick: links[key]['nick'].replace("\[", "\\[").replace("\]", "\\]")};
}
setInterval(function()
{
var users = document.querySelectorAll('a.im-mess-stack--lnk')
for (var i = 0; i < users.length; i++)
{
var user = users[i];
var pattern = new RegExp(links_pattern[user.href].nick);
if (!user.innerHTML.match(pattern) && links[users[i].href])
user.innerHTML = users[i].innerHTML +' (<span style="color: ' +group[links[user.href].group] +'">' +links[user.href].nick +'</span>)';
}
}, 200);