fritigern

Kill trending

Aug 30th, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Kill Trending
  3. // @namespace http://127.0.0.1
  4. // @description Remove Facebook trending topics and activity ticker
  5. // @author fritigern
  6. // @include https://facebook.com/*
  7. // @include https://*.facebook.com/*
  8. // @include http://facebook.com/*
  9. // @include http://*.facebook.com/*
  10. // @run-at document-start
  11. // @version 1.01
  12. // This is a fork of Remove Facebook Distractions by borisjoffe
  13. // Original URL : http://boris.joff3.com
  14. // Original script at : https://greasyfork.org/en/scripts/16650-remove-facebook-distractions
  15. // ==/UserScript==
  16. (function() {var css = [
  17. '#pagelet_trending_tags_and_topics, #pagelet_rhc_ticker { display: none }',
  18. '#pagelet_megaphone{ display: block }'
  19. ].join("\n");
  20. if (typeof GM_addStyle != "undefined") {
  21. GM_addStyle(css);
  22. } else if (typeof PRO_addStyle != "undefined") {
  23. PRO_addStyle(css);
  24. } else if (typeof addStyle != "undefined") {
  25. addStyle(css);
  26. } else {
  27. var node = document.createElement("style");
  28. node.type = "text/css";
  29. node.appendChild(document.createTextNode(css));
  30. var heads = document.getElementsByTagName("head");
  31. if (heads.length > 0) {
  32. heads[0].appendChild(node);
  33. } else {
  34. // no head yet, stick it whereever
  35. document.documentElement.appendChild(node);
  36. }
  37. }
  38. })();
Advertisement
Add Comment
Please, Sign In to add comment