User:Vlad2000Plus/monobook.js

//Based on the script made by de:Benutzer:Spongo // var userSet = new Object; var userSetTip = new Object; userSet['A'] = '|ACrush|Alex Spade|Alma Pater|Altes|A.I.|Amoses|Andrei G Kustov|Atorero|Boleslav1|Butko|CodeMonk|Ctac|DaeX|Dennis Myts|Dodonov|Dmitry Gerasimov|Dmitri Lytov|DR|Dstary|D V S|EvgenyGenkin|George Shuklin|HedgeHog|Ingwar JR|Kalan|Kartmen|Кондратьев|Kv75|Levg|LoKi|Maxim Razin|MaxSem|Mitrius|Morpheios Melas|OckhamTheFox|Ornil|Panther|Pauk|Paul Pogonyshev|Pavelegorov|Putnik|Redline|Serguei S. Dukachev|Solon|Spy1986|Stassats|st0rm|Tassadar|Torin|Tosha|Vald|Vaya|Vinograd19|Volkov|Wulfson|Yurik|Александр Сигачёв|Андрей Романенко|Беломоев Алексей|Владимир Волохонский|Конст. Карасёв|Не А|Neon|Сайга20К|С. Л.|'; userSetTip['A'] = ', Администратор'; userSet['B'] = '|Drbug|Maximaximax|Kneiphof|Obersachse|Wind|'; userSetTip['B'] = ', Бюрократ'; userSet['C'] = '|ACrush|CodeMonk|DaeX|Dmitry Gerasimov|Drbug|Wind|Wulfson|'; userSetTip['C'] = ', checkuser'; userSet['Ar'] = '|Kaganer|Александр Сигачёв|Panther|Solon|EvgenyGenkin|'; userSetTip['Ar'] = ', арбитр'; addOnloadHook(markUsers); function markUsers{ var body, lnk, href, title, mm, user, mark, i, k; if (!(body = document.getElementById('bodyContent'))) return; var links = body.getElementsByTagName('A'); for (i=0; i<links.length; i++){ lnk = links[i]; if (!lnk.title || ! (mm=lnk.title.match('Участник:(.*)'))) continue user = '|' + decodeURIComponent(mm[1]) + '|'; for (k in userSet){ if (userSet[k].indexOf(user) < 0) continue; mark = document.createElement('b'); mark.appendChild(document.createTextNode('(' + k + ')')); if (userSetTip[k]) lnk.title += userSetTip[k]; lnk.appendChild(mark); } } } //