fork download
  1. var shit_threads = document.evaluate("//img[@src='/flags/DE.png']/../../span[@class='postpanel desktop']/a[@class='postbtn-hide']", document, null, XPathResult.ANY_TYPE, null);
  2. var shit_thread = shit_threads.iterateNext();
  3. while (!!shit_thread)
  4. {
  5. shit_thread.click(); //кликаю на скрыть
  6. shit_thread = shit_threads.iterateNext(); //переходим к следующему треду
  7. }
  8.  
  9. //первый тред скрывает, а на остальные на этой же странице консоль хрома ругается:
  10. //Uncaught DOMException: Failed to execute 'iterateNext' on 'XPathResult': The document has mutated since the result was returned.
  11.  
  12. var shit_posts = document.evaluate("//img[@src='/flags/DE.png']/../../..", document, null, XPathResult.ANY_TYPE, null);
  13. var shit_post = shit_posts.iterateNext();
  14. while (!!shit_post)
  15. {
  16. shit_post.innerHTML = "";
  17. shit_post = shit_posts.iterateNext();
  18. }
Runtime error #stdin #stdout #stderr 0.01s 4980KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:1: ReferenceError: document is not defined