Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name DJ name fixer
- // @namespace FM veshtschaniye
- // @version 0.0.0.1
- // @include https://anon.fm
- // @include https://alcxemuct.accountant
- // @include https://anon.fm/info.html
- // @include https://alcxemuct.accountant/info.html
- // @grant unsafeWindow
- // ==/UserScript==
- function fixer() {
- const names = [
- ['fagget', 'Ким Руслан Александрович'],
- ['Ыыыыы', 'Лебедева Ирина Олеговна'],
- ['fiuu', 'Кузнецов Павел Егорович'],
- ['Obsidian', 'Кузьмина Мария Евгеньевна'],
- ['Внучатель 2000', 'Ким Ен Нам'],
- ];
- document.querySelectorAll('.user_id + .user_id, br + .user_id')
- .forEach(el => {
- let nick = el.textContent;
- names.forEach(name => {
- nick = nick.replace(name[1], name[0]);
- });
- el.textContent = nick;
- });
- };
- fixer();
- setInterval(fixer, 2000);
- /*
- function newRenderCooka(type, hash, quote, time, who, text) {
- alert('dck');
- var body = '';
- var respec = text.match(/<br><br>С уважением, (\W+ \W+ \W+)/);
- var name;
- if (respec) {
- name = respec[1];
- name = fixer(name); // !!!
- text = text.replace(respec[0], '');
- } else {
- name = namegen_genName_rand();
- }
- if (hash != '!') {
- var fromname = namegen_genName_str(hash);
- var space = fromname.indexOf(' ');
- if (space > 0) {
- fromname = fromname.substr(0, space) + ' «' + hash + '»' + fromname.substr(space);
- }
- body = '<p><span class="user_id">' + fromname + '</span>: от ' + time + ' - <span class="userpost">' + quote + '</span><br><span class="user_id">' + name + '</span>: ' + text + '</p>';
- } else {
- body = '<p><span class="user_id"><b>Объявление</b></span>, <span class="user_id">' + name + '</span>: в ' + time + ' - ' + text + '</p>';
- }
- return body;
- }
- */
- //console.log(unsafeWindow);
- //console.log(unsafeWindow.renderKooka);
- //unsafeWindow.renderKooka = newRenderCooka;
- //console.log(unsafeWindow.renderKooka);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement