Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. // ==UserScript==
  2. // @name clean.wikia
  3. // @namespace lyr
  4. // @include *://*.wikia.com/*
  5. // @version 2
  6. // @grant none
  7. // ==/UserScript==
  8.  
  9. // Right side of the page
  10. var wRail = document.getElementById("WikiaRail");
  11. var wMainContent = document.getElementById("WikiaMainContent");
  12.  
  13. wRail && wMainContent && wRail.parentNode.removeChild(wRail);
  14. wMainContent.style.width = "100%";
  15.  
  16. // Sticky bar at the bottom of the browser
  17. var wBar = document.getElementById("WikiaBar");
  18.  
  19. wBar && wBar.parentNode.removeChild(wBar);
  20.  
  21. // Discussions at the page
  22. var wDiscussions = document.getElementById("RelatedForumDiscussion");
  23.  
  24. wDiscussions && wDiscussions.parentNode.removeChild(wDiscussions);
  25.  
  26. // Comments at the bottom of the page
  27. var wArticleFooter = document.getElementById("WikiaArticleFooter");
  28.  
  29. wArticleFooter && wArticleFooter.parentNode.removeChild(wArticleFooter);
  30.  
  31. // Fandom ad-footer at the bottom of the page
  32. var wFooter = document.getElementById("WikiaFooter");
  33.  
  34. wFooter && wFooter.parentNode.removeChild(wFooter);
  35.  
  36. // Fandom footer at the bottom of the page
  37. var wGlobalFooter = document.getElementsByClassName("wds-global-footer");
  38.  
  39. wGlobalFooter && wGlobalFooter[0] && wGlobalFooter[0].parentNode.removeChild(wGlobalFooter[0]);
  40.  
  41. // Navigation bar at top
  42. var wNavigation = document.getElementById("globalNavigation");
  43.  
  44. if (wNavigation) {
  45. var root = wNavigation.children[0];
  46. var grandchildren = root.children[1].children;
  47.  
  48. root.children[3] && root.removeChild(root.children[3]);
  49. root.children[0] && root.removeChild(root.children[0]);
  50.  
  51. for (index = grandchildren.length-2; index >= 0; index--) {
  52. var grandchild = grandchildren[index];
  53.  
  54. grandchild && grandchild.parentNode.removeChild(grandchild);
  55. }
  56. }
  57.  
  58. // Fandom notification that pops up. Not sure if this still exists
  59. var st_wNotifications = setTimeout(f_wNotifications, 5000);
  60.  
  61. function f_wNotifications() {
  62. var wNotifications = document.getElementById("WikiaNotifications");
  63.  
  64. wNotifications && wNotifications.parentNode.removeChild(wNotifications);
  65.  
  66. clearTimeout(st_wNotifications);
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement