Guest User

ukryj skurwysyna

a guest
Aug 23rd, 2024
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. window.onload = function() {
  2. function SprawdzSkurwysyna() {
  3. for (let i = 0; i < localStorage.length; i++) {
  4. const key = localStorage.key(i);
  5. if (key.startsWith("skurwysyn_")) {
  6. var skurwysyni = document.querySelectorAll(".thread");
  7. skurwysyni.forEach(function(element) {
  8. element.remove();
  9. });
  10. var id = document.querySelectorAll(".sub-menu.clear");
  11. id.forEach(function(element) {
  12. element.remove();
  13. });
  14. document.body.style.overflow = 'hidden';
  15. break;
  16. }
  17. }
  18. }
  19.  
  20. window.ukryjSkurwysyna = function(uid) {
  21. $('span.posteruid[title="'+uid+'"]').parents('.post').hide();
  22. window.localStorage.setItem('skurwysyn_' + uid, true);
  23. SprawdzSkurwysyna();
  24. }
  25.  
  26. window.setInterval(function(){
  27. $('span.posteruid').each(function() {
  28. var uid = $(this).attr('title');
  29. if(window.localStorage.getItem('skurwysyn_' + uid)) {
  30. $(this).parents('.post').hide();
  31. } else if(this.nextSibling.innerHTML != 'Ukryj skurwysyna') {
  32. $('<a href="javascript:window.ukryjSkurwysyna(\'' + uid + '\');">Ukryj skurwysyna</a>').insertAfter($(this));
  33. }
  34. });
  35. }, 3000);
  36.  
  37. SprawdzSkurwysyna();
  38. };
  39.  
Add Comment
Please, Sign In to add comment