Don't Read Below the Line

Script intended to reduce misanthropic feelings, by hiding the comments section on some UK newspapers.

  1. // ==UserScript==
  2. // @name Don't Read Below the Line
  3. // @namespace http://xyxyx.org/
  4. // @include http://www.theguardian.com/*
  5. // @include https://www.theguardian.com/*
  6. // @include http://www.dailymail.co.uk/*
  7. // @include https://www.dailymail.co.uk/*
  8. // @version 0.3
  9. // @grant none
  10. // @description Script intended to reduce misanthropic feelings, by hiding the comments section on some UK newspapers.
  11. // ==/UserScript==
  12.  
  13. console.log("Trying to hide comments");
  14.  
  15. var hideIfFound = function(element) {
  16. if (!element) {
  17. console.log("Not found");
  18. } else {
  19. console.log("Hiding");
  20. element.style.visibility = 'hidden';
  21. }
  22. }
  23.  
  24. // Gaurdian
  25. hideIfFound(document.getElementById("comments"));
  26. hideIfFound(document.getElementById("top-comments"));
  27. hideIfFound(document.getElementById("d2-root"));
  28.  
  29. // Daily Mail
  30. hideIfFound(document.getElementById("reader-comments"));

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址