r/Warframe • u/lyravega Need more Kuva • Oct 05 '16
Resource Cleaner Warframe wikia script
http://i.imgur.com/K5rNT8l.jpg
Ok I just can't take any more fandom stuff. Don't care. So a while ago got annoyed and wrote this very simple and stupid script for Greasemonkey. Thought some may find it useful here. Create a new user script yourself, and paste all this below. It will hide all the fandom stuff (and a bit more)
edit: Added more block targets, and commented what part does what so you can delete parts of the script and choose what not to block. Some may want to read the comments on the wiki. Personally, I never do.
edit 2: If you are using Stylish, here is an alternative way by /u/Xuerian
Greasemonkey Script:
// ==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);
}
16
u/tgdm TCN Oct 05 '16
I know the wikia needs ads to sustain itself but... god damn are they annoying.
This script cleans the rest of what ublock ignores. Thanks, guy!
4
u/uxlapoga Angry kitty, hysteric kitty, KILL KILL KILL Oct 05 '16
var st_wNotofications = setTimeout(f_wNotifications, 5000)
is missing a ;
at the end of the line
3
u/Polymemnetic I am the fire! Oct 05 '16
Is this just for Warframe, or does the work for all wikia hosted websites? Because if I'm reading that @include code right, it should work for anything?
2
u/Xuerian Oct 05 '16 edited Oct 08 '16
Alternately as a stylish sheet:
4
u/Kliuqard :ModLKliu::ModJKliu:Beloved.:ModSKliu::ModHKliu: Oct 05 '16
Thanks.
1
u/soulreaper259 Oct 05 '16
how do i add this to Tampermonkey?
3
u/acalacaboo Oct 05 '16
!RemindMe 6 hours
2
u/Steleku Capulus Omni Gladium Oct 05 '16
Oh that is so much better. Much many thanks!
2
u/5FDeathPunch What the Hek? Oct 05 '16
I wasn't sure what this was for exactly, so I tried it out, and I'm very impressed. Great job!
3
u/SasoDuck Oct 05 '16
I fucking love you.
0
u/[deleted] Oct 05 '16
[deleted] — view deleted comment