Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name enuresis
- // @namespace manyamiroque
- // @include http://1chan.ru/news/res/*
- // @version 1
- // @grant none
- // ==/UserScript==
- var url = document.getElementsByClassName('b-blog-entry_b-header') [0].getElementsByTagName('a') [0].getAttribute('href');
- var comments = document.getElementsByClassName('b-comment');
- var numbers = [
- ];
- if (document.getElementsByClassName('l-content-wrap') [0].textContent.toLowerCase().indexOf('сосач') > - 1)
- {
- numbers.push(document.getElementsByClassName('l-content-wrap') [0].getElementsByClassName('g-disabled js-post-id-link') [0].textContent.trim().slice(1));
- }
- for (var i = 0; i < comments.length; i++)
- {
- if (comments[i].textContent.toLowerCase().indexOf('сосач') > - 1)
- {
- numbers.push(comments[i].getElementsByClassName('js-paste-link') [0].textContent);
- }
- }
- if (numbers.length > 0)
- {
- var comment = document.createElement('div');
- comment.className = 'b-comment';
- comment.id = 'comment_0000000';
- var info = document.createElement('div');
- info.className = 'b-comment_b-info';
- var date = document.createTextNode('\t\t\t\t\t\t\t32 Хуебря @ 25:61, ');
- info.appendChild(date);
- var postnumt = document.createTextNode('№');
- var postnumta = document.createElement('a');
- postnumta.href = '#0000000';
- postnumta.appendChild(postnumt);
- info.appendChild(postnumta);
- var postnum = document.createTextNode('0000000');
- var postnuma = document.createElement('a');
- postnuma.className = 'js-paste-link';
- postnuma.name = '0000000';
- postnuma.href = 'javascript://';
- postnuma.appendChild(postnum);
- info.appendChild(postnuma);
- var image = document.createElement('img');
- image.src = 'http://1chan.ru/ico/remove.gif';
- image.width = '16';
- image.height = '16';
- image.alt = '0000000';
- var ima = document.createElement('a');
- ima.href = '#';
- ima.className = 'js-remove-button g-hidden';
- ima.appendChild(image);
- info.appendChild(ima);
- comment.appendChild(info);
- var body = document.createElement('div');
- body.className = 'b-comment_b-body g-clearfix';
- var text = document.createElement('p');
- for (var i = 0; i < numbers.length; i++)
- {
- var ref = document.createElement('a');
- ref.className = 'js-cross-link';
- ref.name = 'news/' + numbers[i];
- ref.href = url + '#' + numbers[i];
- var reftext = document.createTextNode('>>' + numbers[i]);
- ref.appendChild(reftext);
- text.appendChild(ref);
- var br = document.createElement('br');
- text.appendChild(br);
- }
- if (numbers.length > 1)
- var t = document.createTextNode('\n\t\t\t\t\t\tобоссал пидорнух');
- else
- var t = document.createTextNode('\n\t\t\t\t\t\tобоссал пидорнуху');
- text.appendChild(t);
- body.appendChild(text);
- comment.appendChild(body);
- var child = document.getElementById('template_comment');
- child.parentNode.insertBefore(comment, child);
- }
Advertisement
Add Comment
Please, Sign In to add comment