FANDOM


(fix)
m (Updated. Thanks go to User:Dunnoob http://community.wikia.com/wiki/Thread:1351786)
Line 6: Line 6:
 
if ((window.location.href.endsWith("Special:Chat")) ||
 
if ((window.location.href.endsWith("Special:Chat")) ||
 
(window.location.href.endsWith("Special:CSS")) ||
 
(window.location.href.endsWith("Special:CSS")) ||
  +
(window.location.href.endsWith( "Special:InfoboxBuilder" )) ||
 
(window.location.href.endsWith("Special:WikiFeatures"))) {
 
(window.location.href.endsWith("Special:WikiFeatures"))) {
 
window.location.href = window.location.href + "?useskin=oasis";
 
window.location.href = window.location.href + "?useskin=oasis";

Revision as of 08:55, December 19, 2017

So, after being linked to Special:WikiActivity one too many times, I wrote a small script in order for it to automatically redirect it. I also added functionality to use some of the Special pages that don't work on monobook - by adding a ?useskin to the URL.

// Handles special pages in monobook that that are "available only in Wikia skin"
var monobookSpecialPageHandler = function() {
    if (skin === "monobook") {
        if ((window.location.href.endsWith("Special:Chat")) ||
             (window.location.href.endsWith("Special:CSS")) ||
             (window.location.href.endsWith( "Special:InfoboxBuilder" )) ||
             (window.location.href.endsWith("Special:WikiFeatures"))) {
            window.location.href = window.location.href + "?useskin=oasis";
        }
        if (window.location.href.endsWith("Special:WikiActivity")) {
            window.location.href = "/wiki/Special:RecentChanges";
        }
    }
};
 
addOnloadHook(monobookSpecialPageHandler);

Feel free to add it to your global.js. If I missed a page that should be here, let me know, or edit this post yourself if you feel confident.

Community content is available under CC-BY-SA unless otherwise noted.