NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Yobtyt'-inator
// @namespace https://github.com/MineGeekYT
// @version 0.1
// @description Yobtyticatate ur comments!
// @author MineGeek
// @match http://pikabu.ru/story/*
// @match http://pikabu.ru/freshitems*
// @grant none
// ==/UserScript==
var str1 = " ^_^";
var str2 = "^_^";
//var str1 = new RegExp(strRaw, 'g');
var str0 = ", йоптыть!";
var text = "";
var count = 0;
comments = document.getElementsByClassName("author");
for (var i = 0; i < comments.length; i++){
if (comments[i].innerHTML == "BlolCOTHNK") {
count++;
//console.log(comments[i].parentNode.parentNode.parentNode.nextSibling.nextSibling);
cur = comments[i].parentNode.parentNode.parentNode.nextSibling.nextSibling.children[0].children[0].children[0];
text = cur.innerHTML.split(str1).join(str0);
text1 = text.split(str2).join(str0);
cur.innerHTML = text1;
}
}
console.log(count);