Advertisement
Guest User

Untitled

a guest
May 25th, 2020
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. console.log("HackerChoose");
  2.  
  3.  
  4. var shitdomains = [
  5. "arstechnica.com",
  6. "bbc.com",
  7. "bloomberg.com",
  8. "businessweek.com",
  9. "cbsnews.com",
  10. "cnbc.com",
  11. "cnet.com",
  12. "cnn.com",
  13. "engadget.com",
  14. "facebook.com",
  15. "fastcompany.com",
  16. "forbes.com",
  17. "ft.com",
  18. "gigaom.com",
  19. "gizmodo.com",
  20. "hbr.org",
  21. "hollywoodreporter.com",
  22. "huffingtonpost.com",
  23. "itworld.com",
  24. "latimes.com",
  25. "linkedin.com",
  26. "mashable.com",
  27. "medium.com",
  28. "nautil.us",
  29. "nbcnews.com",
  30. "networkworld.com",
  31. "npr.org",
  32. "nymag.com",
  33. "nypost.com",
  34. "nytimes.com",
  35. "posterous.com",
  36. "readwriteweb.com",
  37. "slate.com",
  38. "techcrunch.com",
  39. "technologyreview.com",
  40. "theatlantic.com",
  41. "thenation.com",
  42. "thenextweb.com",
  43. "theoatmeal.com",
  44. "theverge.com",
  45. "twitter.com",
  46. "venturebeat.com",
  47. "mobile.twitter.com",
  48. "vice.com",
  49. "washingtonpost.com",
  50. "wired.co.uk",
  51. "wired.com",
  52. "wsj.com",
  53. ];
  54.  
  55. //whether to renumber where stories have been removed
  56. var renumber = false;
  57.  
  58. //site refs live in '<span class="sitestr">shitsite.com</span>'
  59. [...document.querySelectorAll('.sitestr')]
  60.   .filter(e=>shitdomains.includes(e.textContent))
  61.   .map(e=>e.closest('tr.athing'))
  62.   .forEach(e=>{
  63.     for (let i=0,ee=e,nee; i<3; i++) {
  64.       nee = ee.nextElementSibling;
  65.       ee.parentNode.removeChild(ee);
  66.       ee = nee;
  67.     }
  68. });
  69.  
  70. if (renumber) {
  71.   let snum;
  72.   document.querySelectorAll('.rank')
  73.           .forEach((e,i)=>{
  74.         if (!snum) snum = +e.textContent.match(/\d+/)[0];
  75.         e.textContent = (snum++)+'.';
  76.           });
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement