var shit_threads = document.evaluate("//img[@src='/flags/DE.png']/../../span[@class='postpanel desktop']/a[@class='postbtn-hide']", document, null, XPathResult.ANY_TYPE, null);
var shit_thread = shit_threads.iterateNext();
while (!!shit_thread)
{
shit_thread.click(); //кликаю на скрыть
shit_thread = shit_threads.iterateNext(); //переходим к следующему треду
}
//первый тред скрывает, а на остальные на этой же странице консоль хрома ругается:
//Uncaught DOMException: Failed to execute 'iterateNext' on 'XPathResult': The document has mutated since the result was returned.
var shit_posts = document.evaluate("//img[@src='/flags/DE.png']/../../..", document, null, XPathResult.ANY_TYPE, null);
var shit_post = shit_posts.iterateNext();
while (!!shit_post)
{
shit_post.innerHTML = "";
shit_post = shit_posts.iterateNext();
}
dmFyIHNoaXRfdGhyZWFkcyA9IGRvY3VtZW50LmV2YWx1YXRlKCIvL2ltZ1tAc3JjPScvZmxhZ3MvREUucG5nJ10vLi4vLi4vc3BhbltAY2xhc3M9J3Bvc3RwYW5lbCBkZXNrdG9wJ10vYVtAY2xhc3M9J3Bvc3RidG4taGlkZSddIiwgZG9jdW1lbnQsIG51bGwsIFhQYXRoUmVzdWx0LkFOWV9UWVBFLCBudWxsKTsKdmFyIHNoaXRfdGhyZWFkID0gc2hpdF90aHJlYWRzLml0ZXJhdGVOZXh0KCk7CndoaWxlICghIXNoaXRfdGhyZWFkKQoJewoJCXNoaXRfdGhyZWFkLmNsaWNrKCk7IC8v0LrQu9C40LrQsNGOINC90LAg0YHQutGA0YvRgtGMCgkJc2hpdF90aHJlYWQgPSBzaGl0X3RocmVhZHMuaXRlcmF0ZU5leHQoKTsgLy/Qv9C10YDQtdGF0L7QtNC40Lwg0Log0YHQu9C10LTRg9GO0YnQtdC80YMg0YLRgNC10LTRgwoJfQoJCi8v0L/QtdGA0LLRi9C5INGC0YDQtdC0INGB0LrRgNGL0LLQsNC10YIsINCwINC90LAg0L7RgdGC0LDQu9GM0L3Ri9C1INC90LAg0Y3RgtC+0Lkg0LbQtSDRgdGC0YDQsNC90LjRhtC1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