Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name clean.wikia
- // @namespace lyr
- // @include *://*.wikia.com/*
- // @version 2
- // @grant none
- // ==/UserScript==
- // Right side of the page
- var wRail = document.getElementById("WikiaRail");
- var wMainContent = document.getElementById("WikiaMainContent");
- wRail && wMainContent && wRail.parentNode.removeChild(wRail);
- wMainContent.style.width = "100%";
- // Sticky bar at the bottom of the browser
- var wBar = document.getElementById("WikiaBar");
- wBar && wBar.parentNode.removeChild(wBar);
- // Discussions at the page
- var wDiscussions = document.getElementById("RelatedForumDiscussion");
- wDiscussions && wDiscussions.parentNode.removeChild(wDiscussions);
- // Comments at the bottom of the page
- var wArticleFooter = document.getElementById("WikiaArticleFooter");
- wArticleFooter && wArticleFooter.parentNode.removeChild(wArticleFooter);
- // Fandom ad-footer at the bottom of the page
- var wFooter = document.getElementById("WikiaFooter");
- wFooter && wFooter.parentNode.removeChild(wFooter);
- // Fandom footer at the bottom of the page
- var wGlobalFooter = document.getElementsByClassName("wds-global-footer");
- wGlobalFooter && wGlobalFooter[0] && wGlobalFooter[0].parentNode.removeChild(wGlobalFooter[0]);
- // Navigation bar at top
- var wNavigation = document.getElementById("globalNavigation");
- if (wNavigation) {
- var root = wNavigation.children[0];
- var grandchildren = root.children[1].children;
- root.children[3] && root.removeChild(root.children[3]);
- root.children[0] && root.removeChild(root.children[0]);
- for (index = grandchildren.length-2; index >= 0; index--) {
- var grandchild = grandchildren[index];
- grandchild && grandchild.parentNode.removeChild(grandchild);
- }
- }
- // Fandom notification that pops up. Not sure if this still exists
- var st_wNotifications = setTimeout(f_wNotifications, 5000);
- function f_wNotifications() {
- var wNotifications = document.getElementById("WikiaNotifications");
- wNotifications && wNotifications.parentNode.removeChild(wNotifications);
- clearTimeout(st_wNotifications);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement