Community Central
Community Central
m (kekw)
mNo edit summary
Line 4: Line 4:
   
 
// MediaWiki config array.
 
// MediaWiki config array.
var c = mw.config.get( [
+
var c = mw.config.get([
'wgPageName',
+
'wgPageName',
'wgServer',
+
'wgServer',
'wgCanonicalSpecialPageName',
+
'wgCanonicalSpecialPageName',
'wgTitle',
+
'wgTitle',
'wgAction',
+
'wgAction',
'wgCanonicalNamespace',
+
'wgCanonicalNamespace',
'wgNamespaceNumber',
+
'wgNamespaceNumber',
'wgUserGroups',
+
'wgUserGroups',
'wgSiteName',
+
'wgSiteName',
'skin'
+
'skin'
 
]);
 
]);
   
 
(function (window, $, mw) {
 
(function (window, $, mw) {
"use strict";
+
"use strict";
   
// Global Nav Fix (source: http://dev.wikia.com/wiki/MediaWiki:ExpandGlobalNavDropdownsOnHover/code.js)
+
// Global Nav Fix (source: http://dev.wikia.com/wiki/MediaWiki:ExpandGlobalNavDropdownsOnHover/code.js)
require(['wikia.window', 'mw'], function(context, mw) {
+
// require(['wikia.window', 'mw'], function (context, mw) {
var globalNav = document.getElementById('globalNavigation');
+
// var globalNav = document.getElementById('globalNavigation');
 
Array.prototype.slice.call(globalNav.getElementsByClassName('wds-global-navigation__dropdown-toggle')).forEach(function(elem){
 
elem.addEventListener('mouseenter', elem.click);
 
elem.parentNode.addEventListener('mouseleave', elem.click.bind(elem));
 
});
 
 
globalNav.querySelector('.wds-avatar').addEventListener('click', function () {
 
context.location = (new mw.Title(mw.user.name(), 2)).getUrl();
 
});
 
});
 
   
 
// Array.prototype.slice.call(globalNav.getElementsByClassName('wds-global-navigation__dropdown-toggle')).forEach(function (elem) {
// Make the title awesome again
 
 
// elem.addEventListener('mouseenter', elem.click);
// $("title").text().replace(/\Fandom powered by Wikia$/, 'Wikia');
 
 
// elem.parentNode.addEventListener('mouseleave', elem.click.bind(elem));
 
// });
   
 
// globalNav.querySelector('.wds-avatar').addEventListener('click', function () {
// Fandom goes bye-bye
 
 
// context.location = (new mw.Title(mw.user.name(), 2)).getUrl();
$('svg.wds-global-navigation__logo-image').replaceWith('<img src="http://vignette2.wikia.nocookie.net/fghfghfgh510s-sandbox/images/2/2f/Wikia_logo_large.jpg/revision/latest?cb=20161004230637" />');
 
 
// });
// $('svg.wds-is-wds-company-logo-powered-by-wikia').remove();
 
 
// });
   
// Are we on a special page?
+
// Make the title awesome again
 
// $("title").text().replace(/\Fandom powered by Wikia$/, 'Wikia');
if(c.wgCanonicalSpecialPageName === 'Contributions') {
 
  +
var change = wgTitle.split("/");
 
 
// Fandom goes bye-bye
var title = change[1];
 
 
$('svg.wds-global-navigation__logo-image').replaceWith('<img src="https://vignette2.wikia.nocookie.net/fghfghfgh510s-sandbox/images/2/2f/Wikia_logo_large.jpg/revision/latest?cb=20161004230637" />');
} else {
 
 
// $('svg.wds-is-wds-company-logo-powered-by-wikia').remove();
var title = wgTitle;
 
  +
}
 
  +
// Are we on a special page?
  +
let title;
 
if (c.wgCanonicalSpecialPageName === 'Contributions') {
 
var change = wgTitle.split("/");
 
title = change[1];
 
} else { title = wgTitle; }
   
// Add edit link to WLH pages
+
// Add edit link to WLH pages
// Taken from http://community.wikia.com/wiki/User:Shockstorm/global.js?oldid=1283852
+
// Taken from http://community.wikia.com/wiki/User:Shockstorm/global.js?oldid=1283852
// jQuery version by UltimateSupreme (http://dev.wikia.com/wiki/User:UltimateSupreme)
+
// jQuery version by UltimateSupreme (http://dev.wikia.com/wiki/User:UltimateSupreme)
if (c.wgCanonicalSpecialPageName === 'Whatlinkshere' && c.wgSiteName !== "Elder Scrolls") {
+
if (c.wgCanonicalSpecialPageName === 'Whatlinkshere' && c.wgSiteName !== "Elder Scrolls") {
$("#mw-whatlinkshere-list").find("li").each(function () {
+
$("#mw-whatlinkshere-list").find("li").each(function () {
"use strict";
+
var $this = $(this),
var $this = $(this),
+
$link = '<span class = "mw-whatlinkshere-edit"><a title="Edit form" href="'
$link = '<span class = "mw-whatlinkshere-edit"><a title="Edit form" href="'
 
 
+ $this.find("a").attr("href") + '?action=edit">(edit)</a></span> &lrm; ';
 
+ $this.find("a").attr("href") + '?action=edit">(edit)</a></span> &lrm; ';
$this.find(".mw-whatlinkshere-tools").before($link);
+
$this.find(".mw-whatlinkshere-tools").before($link);
});
+
});
}
+
}
   
// Adds some links in the header toolbar (not forum threads).
+
// Adds some links in the header toolbar (not forum threads).
if(c.wgNamespaceNumber !== 1201) {
+
if (c.wgNamespaceNumber !== 1201) {
$(".WikiaMenuElement li").last().after('<li id="wlh"><a href="/wiki/Special:WhatLinksHere/'+mw.html.escape(wgPageName)+'?limit=750" accesskey="wlh" data-id="whatlinkshere" id="ca-whatlinkshere">WhatLinksHere</a></li><li id="prefix"><a href="/wiki/Special:PrefixIndex/'+mw.html.escape(wgPageName)+'" accesskey="prefix" data-id="prefixindex" id="ca-prefixindex">Subpage List</a></li>');
+
$(".WikiaMenuElement li").last().after('<li id="wlh"><a href="/wiki/Special:WhatLinksHere/' + mw.html.escape(wgPageName) + '?limit=750" accesskey="wlh" data-id="whatlinkshere" id="ca-whatlinkshere">WhatLinksHere</a></li><li id="prefix"><a href="/wiki/Special:PrefixIndex/' + mw.html.escape(wgPageName) + '" accesskey="prefix" data-id="prefixindex" id="ca-prefixindex">Subpage List</a></li>');
}
+
}
   
// Remove the Create/Edit button from WhatLinksHere because it's pointless...
+
// Remove the Create/Edit button from WhatLinksHere because it's pointless...
var wlh = title.search("WhatLinksHere");
+
var wlh = title.search("WhatLinksHere");
if(wlh > -1) {
+
if (wlh > -1) {
$(".WikiaPageHeader .wikia-button").hide();
+
$(".WikiaPageHeader .wikia-button").hide();
}
+
}
   
// Fix position of the editor buttons
+
// Fix position of the editor buttons
if(c.wgNamespaceNumber !== 3 && c.wgNamespaceNumber !== 1200 && c.wgNamespaceNumber !== 1201 && $('nav.wikia-menu-button:nth-child(2)').length) {
+
if (c.wgNamespaceNumber !== 3 && c.wgNamespaceNumber !== 1200 && c.wgNamespaceNumber !== 1201 && $('nav.wikia-menu-button:nth-child(2)').length) {
importScriptPage('MediaWiki:RelocateEditDiscussionButtons/code.js', 'dev');
+
importScriptPage('MediaWiki:RelocateEditDiscussionButtons/code.js', 'dev');
}
+
}
   
// Add link to Special:Editcount on Userpages.
+
// Add link to Special:Editcount on Userpages.
$("div.WikiaUserPagesHeader > div.tabs-container > ul.tabs li").last().after('<li data-id="ec"><a href="/wiki/Special:Editcount/'+mw.html.escape(title)+'" title="Special:Editcount/'+mw.html.escape(title)+'">Editcount</a></li>');
+
$("div.WikiaUserPagesHeader > div.tabs-container > ul.tabs li").last().after('<li data-id="ec"><a href="/wiki/Special:Editcount/' + mw.html.escape(title) + '" title="Special:Editcount/' + mw.html.escape(title) + '">Editcount</a></li>');
   
// Adds quick links for important special pages
+
// Adds quick links for important special pages
// TO-DO: Make it a dropdown menu.
+
// TO-DO: Make it a dropdown menu.
$("nav.activity-nav li.watchlist").after('<li class="watchlist"><a href="/wiki/Special:WantedPages?limit=20&offset=0">Wanted Pages</a></li><li class="watchlist"><a href="/wiki/Special:SpecialPages">Special Pages</a></li>');
+
$("nav.activity-nav li.watchlist").after('<li class="watchlist"><a href="/wiki/Special:WantedPages?limit=20&offset=0">Wanted Pages</a></li><li class="watchlist"><a href="/wiki/Special:SpecialPages">Special Pages</a></li>');
   
// Adds link to EditWatchlist/raw on tools menu
+
// Adds link to EditWatchlist/raw on tools menu
$(".tools-menu li.overflow").first().before("<li class='overflow'><a href='/wiki/Special:EditWatchlist/raw' data-name='watchlist'>Watchlist</a></li>");
+
$(".tools-menu li.overflow").first().before("<li class='overflow'><a href='/wiki/Special:EditWatchlist/raw' data-name='watchlist'>Watchlist</a></li>");
   
// Places an "Edit this Page" quicklink on normal talkpages and User Talkpages (not my own).
+
// Places an "Edit this Page" quicklink on normal talkpages and User Talkpages (not my own).
if(c.wgNamespaceNumber === 3 && c.wgPageName !== "User_talk:SuperSajuuk") {
+
if (c.wgNamespaceNumber === 3 && c.wgPageName !== "User_talk:SuperSajuuk") {
$("div.UserProfileActionButton nav.wikia-menu-button").before('<a class="wikia-button" href="/wiki/'+mw.html.escape(wgPageName)+'?action=edit" data-id="editprofile"><img class="sprite edit-pencil" height="16" src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" width="22"> Edit Talkpage </a> ');
+
$("div.UserProfileActionButton nav.wikia-menu-button").before('<a class="wikia-button" href="/wiki/' + mw.html.escape(wgPageName) + '?action=edit" data-id="editprofile"><img class="sprite edit-pencil" height="16" src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" width="22"> Edit Talkpage </a> ');
}
+
}
   
// Make hidden replies visible in threads.
+
// Make hidden replies visible in threads.
// $(".message-removed.hide").removeClass("hide");
+
// $(".message-removed.hide").removeClass("hide");
   
// Null Edit button
+
// Null Edit button
// Conditionally load purge button if page cannot be edited
+
// Conditionally load purge button if page cannot be edited
if ($("#ca-edit").length || $("a[data-id='editprofile']").length) {
+
if ($("#ca-edit").length || $("a[data-id='editprofile']").length) {
importScriptPage('MediaWiki:NullEditButton/code.js', 'dev');
+
importScriptPage('MediaWiki:NullEditButton/code.js', 'dev');
} else {
+
} else {
importScriptPage('MediaWiki:PurgeButton/code.js', 'dev');
+
importScriptPage('MediaWiki:PurgeButton/code.js', 'dev');
}
+
}
  +
 
// Bottom Bar Links
 
$("div.WikiaBarWrapper ul li").first().before("<li><a href='#top'>Back to Top</a></li>");
 
$("div.WikiaBarWrapper ul li").first().after("<li><a href='/wiki/Special:Contact'>Contact Wikia</a></li>");
   
 
// Add quick links to AccountNavigation.
// Bottom Bar Links
 
 
$("div.wds-global-navigation__user-menu div.wds-dropdown__content li").last().after('<li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/global.js" target="_blank">Global JS</a></li><li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/global.css" target="_blank">Global CSS</a></li><li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/header.css" target="_blank">Header CSS</a></li>');
$("div.WikiaBarWrapper ul li").first().before("<li><a href='#top'>Back to Top</a></li>");
 
$("div.WikiaBarWrapper ul li").first().after("<li><a href='/wiki/Special:Contact'>Contact Wikia</a></li>");
 
 
// Add quick links to AccountNavigation.
 
$("div.wds-global-navigation__user-menu div.wds-dropdown__content li").last().after('<li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/global.js" target="_blank">Global JS</a></li><li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/global.css" target="_blank">Global CSS</a></li><li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/header.css" target="_blank">Header CSS</a></li>');
 
   
// Update dropdown.
+
// Update dropdown.
$("div.wds-global-navigation__user-menu div.wds-dropdown__content li").first().remove();
+
$("div.wds-global-navigation__user-menu div.wds-dropdown__content li").first().remove();
// $("div.wds-global-navigation__user-menu div.wds-dropdown__toggle").wrapAll("<a href='/wiki/User:SuperSajuuk' title='Go to Profile' />");
+
// $("div.wds-global-navigation__user-menu div.wds-dropdown__toggle").wrapAll("<a href='/wiki/User:SuperSajuuk' title='Go to Profile' />");
 
}(window, jQuery, mediaWiki));
 
}(window, jQuery, mediaWiki));
   
Line 130: Line 128:
 
// The tags themselves.
 
// The tags themselves.
 
window.UserTagsJS = {
 
window.UserTagsJS = {
modules: {
+
modules: {
 
newuser: {
 
newuser: {
days: 14,
+
days: 14,
edits: 25
+
edits: 25
 
},
 
},
 
mwGroups: ['bureaucrat', 'sysop', 'rollback', 'chatmoderator', 'threadmoderator', 'content-moderator', 'custodian', 'patroller', 'wikiastars', 'inactive', 'newuser', 'bot', 'voldev', 'bot-global', 'staff'],
 
mwGroups: ['bureaucrat', 'sysop', 'rollback', 'chatmoderator', 'threadmoderator', 'content-moderator', 'custodian', 'patroller', 'wikiastars', 'inactive', 'newuser', 'bot', 'voldev', 'bot-global', 'staff'],
 
metafilter: {
 
metafilter: {
'chatmoderator': ['sysop','bureaucrat'],
+
'chatmoderator': ['sysop', 'bureaucrat'],
'rollback': ['sysop','bureaucrat'],
+
'rollback': ['sysop', 'bureaucrat'],
'chatmoderator': ['threadmoderator'],
+
'chatmoderator': ['threadmoderator'],
'bot': ['bot-global']
+
'bot': ['bot-global']
 
}
 
}
},
+
},
tags: {
+
tags: {
 
// Per-Wiki Flags (Local)
 
// Per-Wiki Flags (Local)
bureaucrat: { u: 'Crat', title: 'This user can grant rights to others', order:1 },
+
bureaucrat: {u: 'Crat', title: 'This user can grant rights to others', order: 1},
sysop: { u: 'Sysop', title: 'This user manages the wiki', order:2 },
+
sysop: {u: 'Sysop', title: 'This user manages the wiki', order: 2},
rollback: { link: 'Project:Rollback', title: 'This user can revert vandalism', order:3 },
+
rollback: {link: 'Project:Rollback', title: 'This user can revert vandalism', order: 3},
chatmoderator: { u: 'Chat Mod', title: 'This user moderates the chat', order:4 },
+
chatmoderator: {u: 'Chat Mod', title: 'This user moderates the chat', order: 4},
threadmoderator: { u: 'Disc. Mod', title: 'This user moderates discussions', order:5 },
+
threadmoderator: {u: 'Disc. Mod', title: 'This user moderates discussions', order: 5},
'content-moderator': { u: 'Main Mod', title: 'This user moderates wiki content', order:6 },
+
'content-moderator': {u: 'Main Mod', title: 'This user moderates wiki content', order: 6},
bot: { u: 'Bot', title: 'This account is used for mass editing', order:7 },
+
bot: {u: 'Bot', title: 'This account is used for mass editing', order: 7},
   
 
// Wikia-Wide Flags (Global)
 
// Wikia-Wide Flags (Global)
voldev: { u: 'Vol Dev', title: 'This user helps Wikia with system coding' },
+
voldev: {u: 'Vol Dev', title: 'This user helps Wikia with system coding'},
helper: { u: 'Helper', title: 'This user helps Wikia with non-English communities' },
+
helper: {u: 'Helper', title: 'This user helps Wikia with non-English communities'},
'bot-global': { u: 'Global Bot', title: 'This bot is used for Wikia-wide editing tasks' },
+
'bot-global': {u: 'Global Bot', title: 'This bot is used for Wikia-wide editing tasks'},
staff: { u: 'Staff', title: 'This user is a paid employee for Wikia Inc.' },
+
staff: {u: 'Staff', title: 'This user is a paid employee for Wikia Inc.'},
   
 
// Custom Flags
 
// Custom Flags
coder: { u: 'Coder', title: 'This user is a coder' },
+
coder: {u: 'Coder', title: 'This user is a coder'},
translator: { u: 'Translator', title: 'This user can translate languages' },
+
translator: {u: 'Translator', title: 'This user can translate languages'},
inactive: { title: 'This user does not visit the wiki often' },
+
inactive: {title: 'This user does not visit the wiki often'},
awesome: { u: 'Awesome Person', title: 'This user is undeniably awesome in all ways possible' }
+
awesome: {u: 'Awesome Person', title: 'This user is undeniably awesome in all ways possible'}
},
+
},
 
};
 
};
   
 
// UserTags Built-In Modules.
 
// UserTags Built-In Modules.
 
UserTagsJS.modules.inactive = {
 
UserTagsJS.modules.inactive = {
inactive: 30,
+
inactive: 30,
zeroIsInactive: true
+
zeroIsInactive: true
 
};
 
};
 
UserTagsJS.modules.autoconfirmed = true;
 
UserTagsJS.modules.autoconfirmed = true;
   
 
// UserTags User Filter
 
// UserTags User Filter
UserTagsJS.modules.userfilter = {
+
UserTagsJS.modules.userfilter = {};
 
};
 
   
 
// UserTags Custom Tags
 
// UserTags Custom Tags
 
UserTagsJS.modules.custom = {
 
UserTagsJS.modules.custom = {
'UltimateSupreme': ['coder']
+
'UltimateSupreme': ['coder']
 
};
 
};
   
Line 190: Line 186:
   
 
// AjaxRC
 
// AjaxRC
window.ajaxPages = ["Special:WikiActivity","Special:Log","Special:RecentChanges"];
+
window.ajaxPages = ["Special:WikiActivity", "Special:Log", "Special:RecentChanges"];
 
window.ajaxIndicator = 'http://images2.wikia.nocookie.net/__cb20100609110347/software/images/a/a9/Indicator.gif';
 
window.ajaxIndicator = 'http://images2.wikia.nocookie.net/__cb20100609110347/software/images/a/a9/Indicator.gif';
 
window.AjaxRCRefreshText = 'Auto Refresh';
 
window.AjaxRCRefreshText = 'Auto Refresh';
Line 216: Line 212:
 
// Site List
 
// Site List
 
var sites = [
 
var sites = [
"Fire Brigade of Flames Wiki",
+
"Fire Brigade of Flames Wiki",
"Impressions Games Wiki",
+
"Impressions Games Wiki",
"City-Building Games Wiki",
+
"City-Building Games Wiki",
"Encyclopedia Hiigara"
+
"Encyclopedia Hiigara"
 
];
 
];
   
 
// Load these scripts if the presently viewed site is not in the array.
 
// Load these scripts if the presently viewed site is not in the array.
if($.inArray(c.wgSiteName,sites) == -1) {
+
if ($.inArray(c.wgSiteName, sites) == -1) {
importScriptPage('MediaWiki:Gadget-AcountNav.js', 'naruto');
+
importScriptPage('MediaWiki:Gadget-AcountNav.js', 'naruto');
importScriptPage('MediaWiki:CacheCheck/code.js', 'dev');
+
importScriptPage('MediaWiki:CacheCheck/code.js', 'dev');
 
}
 
}
   
Line 239: Line 235:
 
// Userspace scripts will be loaded first.
 
// Userspace scripts will be loaded first.
 
importArticles({
 
importArticles({
type: "script",
+
type: "script",
articles: [
+
articles: [
"u:c:User:SuperSajuuk/FileModule.js", // Imports a File Module script (copied from 452's global js)
+
"u:c:User:SuperSajuuk/FileModule.js", // Imports a File Module script (copied from 452's global js)
"u:dev:MediaWiki:UnsafeScripts/code.js", // Needed for some stuff, load it first.
+
"u:dev:MediaWiki:UnsafeScripts/code.js", // Needed for some stuff, load it first.
"u:dev:MediaWiki:TabKeyInserter/code.js",
+
"u:dev:MediaWiki:TabKeyInserter/code.js",
"u:dev:MediaWiki:AbuseLogRC.js",
+
"u:dev:MediaWiki:AbuseLogRC.js",
"u:dev:MediaWiki:WallGreetingButton/code.js",
+
"u:dev:MediaWiki:WallGreetingButton/code.js",
"u:dev:MediaWiki:ThreadIndicator/code.js",
+
"u:dev:MediaWiki:ThreadIndicator/code.js",
"u:dev:MediaWiki:PortableCSSPad/code.js",
+
"u:dev:MediaWiki:PortableCSSPad/code.js",
"u:dev:MediaWiki:UserTags/code.js",
+
"u:dev:MediaWiki:UserTags/code.js",
"u:dev:MediaWiki:ListFiles/code.js",
+
"u:dev:MediaWiki:ListFiles/code.js",
"u:dev:MediaWiki:AjaxUndo/code.js",
+
"u:dev:MediaWiki:AjaxUndo/code.js",
"u:dev:MediaWiki:Status/code.js",
+
"u:dev:MediaWiki:Status/code.js",
"u:dev:User:UltimateSupreme/AjaxRollback.js",
+
"u:dev:User:UltimateSupreme/AjaxRollback.js",
"u:dev:MediaWiki:FileUsageAuto-update/code.js",
+
"u:dev:MediaWiki:FileUsageAuto-update/code.js",
"u:dev:MediaWiki:AjaxRC/code.js",
+
"u:dev:MediaWiki:AjaxRC/code.js",
"u:dev:MediaWiki:PurgeBlogs/code.js",
+
"u:dev:MediaWiki:PurgeBlogs/code.js",
"u:dev:MediaWiki:NoImageLightbox/code.js",
+
"u:dev:MediaWiki:NoImageLightbox/code.js",
"u:dev:MediaWiki:QQX/code.js"
+
"u:dev:MediaWiki:QQX/code.js"
 
]
]
 
 
});
 
});
   

Revision as of 19:45, 22 April 2021

//
// START: jQuery code snippets
//

// MediaWiki config array.
var c = mw.config.get([
    'wgPageName',
    'wgServer',
    'wgCanonicalSpecialPageName',
    'wgTitle',
    'wgAction',
    'wgCanonicalNamespace',
    'wgNamespaceNumber',
    'wgUserGroups',
    'wgSiteName',
    'skin'
]);

(function (window, $, mw) {
    "use strict";

    // Global Nav Fix (source: http://dev.wikia.com/wiki/MediaWiki:ExpandGlobalNavDropdownsOnHover/code.js)
    // require(['wikia.window', 'mw'], function (context, mw) {
    //     var globalNav = document.getElementById('globalNavigation');

    //     Array.prototype.slice.call(globalNav.getElementsByClassName('wds-global-navigation__dropdown-toggle')).forEach(function (elem) {
    //         elem.addEventListener('mouseenter', elem.click);
    //         elem.parentNode.addEventListener('mouseleave', elem.click.bind(elem));
    //     });

    //     globalNav.querySelector('.wds-avatar').addEventListener('click', function () {
    //         context.location = (new mw.Title(mw.user.name(), 2)).getUrl();
    //     });
    // });

    // Make the title awesome again
    // $("title").text().replace(/\Fandom powered by Wikia$/, 'Wikia');

    // Fandom goes bye-bye
    $('svg.wds-global-navigation__logo-image').replaceWith('<img src="https://vignette2.wikia.nocookie.net/fghfghfgh510s-sandbox/images/2/2f/Wikia_logo_large.jpg/revision/latest?cb=20161004230637" />');
    // $('svg.wds-is-wds-company-logo-powered-by-wikia').remove();

    // Are we on a special page?
    let title;
    if (c.wgCanonicalSpecialPageName === 'Contributions') {
        var change = wgTitle.split("/");
        title = change[1];
    } else { title = wgTitle; }

    // Add edit link to WLH pages
    // Taken from http://community.wikia.com/wiki/User:Shockstorm/global.js?oldid=1283852
    // jQuery version by UltimateSupreme (http://dev.wikia.com/wiki/User:UltimateSupreme)
    if (c.wgCanonicalSpecialPageName === 'Whatlinkshere' && c.wgSiteName !== "Elder Scrolls") {
        $("#mw-whatlinkshere-list").find("li").each(function () {
            var $this = $(this),
                $link = '<span class = "mw-whatlinkshere-edit"><a title="Edit form" href="'
                    + $this.find("a").attr("href") + '?action=edit">(edit)</a></span>  &lrm; ';
            $this.find(".mw-whatlinkshere-tools").before($link);
        });
    }

    // Adds some links in the header toolbar (not forum threads).
    if (c.wgNamespaceNumber !== 1201) {
        $(".WikiaMenuElement li").last().after('<li id="wlh"><a href="/wiki/Special:WhatLinksHere/' + mw.html.escape(wgPageName) + '?limit=750" accesskey="wlh" data-id="whatlinkshere" id="ca-whatlinkshere">WhatLinksHere</a></li><li id="prefix"><a href="/wiki/Special:PrefixIndex/' + mw.html.escape(wgPageName) + '" accesskey="prefix" data-id="prefixindex" id="ca-prefixindex">Subpage List</a></li>');
    }

    // Remove the Create/Edit button from WhatLinksHere because it's pointless...
    var wlh = title.search("WhatLinksHere");
    if (wlh > -1) {
        $(".WikiaPageHeader .wikia-button").hide();
    }

    // Fix position of the editor buttons
    if (c.wgNamespaceNumber !== 3 && c.wgNamespaceNumber !== 1200 && c.wgNamespaceNumber !== 1201 && $('nav.wikia-menu-button:nth-child(2)').length) {
        importScriptPage('MediaWiki:RelocateEditDiscussionButtons/code.js', 'dev');
    }

    // Add link to Special:Editcount on Userpages.
    $("div.WikiaUserPagesHeader > div.tabs-container > ul.tabs li").last().after('<li data-id="ec"><a href="/wiki/Special:Editcount/' + mw.html.escape(title) + '" title="Special:Editcount/' + mw.html.escape(title) + '">Editcount</a></li>');

    // Adds quick links for important special pages
    // TO-DO: Make it a dropdown menu.
    $("nav.activity-nav li.watchlist").after('<li class="watchlist"><a href="/wiki/Special:WantedPages?limit=20&offset=0">Wanted Pages</a></li><li class="watchlist"><a href="/wiki/Special:SpecialPages">Special Pages</a></li>');

    // Adds link to EditWatchlist/raw on tools menu
    $(".tools-menu li.overflow").first().before("<li class='overflow'><a href='/wiki/Special:EditWatchlist/raw' data-name='watchlist'>Watchlist</a></li>");

    // Places an "Edit this Page" quicklink on normal talkpages and User Talkpages (not my own).
    if (c.wgNamespaceNumber === 3 && c.wgPageName !== "User_talk:SuperSajuuk") {
        $("div.UserProfileActionButton nav.wikia-menu-button").before('<a class="wikia-button" href="/wiki/' + mw.html.escape(wgPageName) + '?action=edit" data-id="editprofile"><img class="sprite edit-pencil" height="16" src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" width="22"> Edit Talkpage	</a>	');
    }

    // Make hidden replies visible in threads.
    // $(".message-removed.hide").removeClass("hide");

    // Null Edit button
    // Conditionally load purge button if page cannot be edited
    if ($("#ca-edit").length || $("a[data-id='editprofile']").length) {
        importScriptPage('MediaWiki:NullEditButton/code.js', 'dev');
    } else {
        importScriptPage('MediaWiki:PurgeButton/code.js', 'dev');
    }

    // Bottom Bar Links
    $("div.WikiaBarWrapper ul li").first().before("<li><a href='#top'>Back to Top</a></li>");
    $("div.WikiaBarWrapper ul li").first().after("<li><a href='/wiki/Special:Contact'>Contact Wikia</a></li>");

    // Add quick links to AccountNavigation.
    $("div.wds-global-navigation__user-menu div.wds-dropdown__content li").last().after('<li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/global.js" target="_blank">Global JS</a></li><li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/global.css" target="_blank">Global CSS</a></li><li><a href="http://community.wikia.com/wiki/User:SuperSajuuk/header.css" target="_blank">Header CSS</a></li>');

    // Update dropdown.
    $("div.wds-global-navigation__user-menu div.wds-dropdown__content li").first().remove();
    // $("div.wds-global-navigation__user-menu div.wds-dropdown__toggle").wrapAll("<a href='/wiki/User:SuperSajuuk' title='Go to Profile' />");
}(window, jQuery, mediaWiki));

//
// END: jQuery code snippets
//

// 
// START: Pre-Script Loading
//

// 
// START: UserTags Configuration
//

// The tags themselves.
window.UserTagsJS = {
    modules: {
        newuser: {
            days: 14,
            edits: 25
        },
        mwGroups: ['bureaucrat', 'sysop', 'rollback', 'chatmoderator', 'threadmoderator', 'content-moderator', 'custodian', 'patroller', 'wikiastars', 'inactive', 'newuser', 'bot', 'voldev', 'bot-global', 'staff'],
        metafilter: {
            'chatmoderator': ['sysop', 'bureaucrat'],
            'rollback': ['sysop', 'bureaucrat'],
            'chatmoderator': ['threadmoderator'],
            'bot': ['bot-global']
        }
    },
    tags: {
        // Per-Wiki Flags (Local)
        bureaucrat: {u: 'Crat', title: 'This user can grant rights to others', order: 1},
        sysop: {u: 'Sysop', title: 'This user manages the wiki', order: 2},
        rollback: {link: 'Project:Rollback', title: 'This user can revert vandalism', order: 3},
        chatmoderator: {u: 'Chat Mod', title: 'This user moderates the chat', order: 4},
        threadmoderator: {u: 'Disc. Mod', title: 'This user moderates discussions', order: 5},
        'content-moderator': {u: 'Main Mod', title: 'This user moderates wiki content', order: 6},
        bot: {u: 'Bot', title: 'This account is used for mass editing', order: 7},

        // Wikia-Wide Flags (Global)
        voldev: {u: 'Vol Dev', title: 'This user helps Wikia with system coding'},
        helper: {u: 'Helper', title: 'This user helps Wikia with non-English communities'},
        'bot-global': {u: 'Global Bot', title: 'This bot is used for Wikia-wide editing tasks'},
        staff: {u: 'Staff', title: 'This user is a paid employee for Wikia Inc.'},

        // Custom Flags
        coder: {u: 'Coder', title: 'This user is a coder'},
        translator: {u: 'Translator', title: 'This user can translate languages'},
        inactive: {title: 'This user does not visit the wiki often'},
        awesome: {u: 'Awesome Person', title: 'This user is undeniably awesome in all ways possible'}
    },
};

// UserTags Built-In Modules.
UserTagsJS.modules.inactive = {
    inactive: 30,
    zeroIsInactive: true
};
UserTagsJS.modules.autoconfirmed = true;

// UserTags User Filter
UserTagsJS.modules.userfilter = {};

// UserTags Custom Tags
UserTagsJS.modules.custom = {
    'UltimateSupreme': ['coder']
};


//
// END: UserTags Configuration
//

// AjaxRC
window.ajaxPages = ["Special:WikiActivity", "Special:Log", "Special:RecentChanges"];
window.ajaxIndicator = 'http://images2.wikia.nocookie.net/__cb20100609110347/software/images/a/a9/Indicator.gif';
window.AjaxRCRefreshText = 'Auto Refresh';
window.AjaxRCRefreshHoverText = 'Silently refreshes the contents of this page every 60 seconds without requiring a full reload';

// AbuseLogRC
abuseLogRC_entries = 5;
abuseLogRC_showTo = 'all';
abuseLogRC_users = ['SuperSajuuk'];

// 
// END: Pre-Script Loading
//

//
// START: Conditional Script Loader
//

// NOTE: This section is for scripts that should
// NOT load on particular wiki's, but should load
// elsewhere. This should be used for wiki's
// where Common.js already loads these scripts and
// causes duplicate loading to occur.

// Site List
var sites = [
    "Fire Brigade of Flames Wiki",
    "Impressions Games Wiki",
    "City-Building Games Wiki",
    "Encyclopedia Hiigara"
];

// Load these scripts if the presently viewed site is not in the array.
if ($.inArray(c.wgSiteName, sites) == -1) {
    importScriptPage('MediaWiki:Gadget-AcountNav.js', 'naruto');
    importScriptPage('MediaWiki:CacheCheck/code.js', 'dev');
}

//
// END: Conditional Script Loader
//

//
// START: All Scripts Loader
//

// This is for scripts that will be enabled everywhere regardless of Common.js.
// Userspace scripts will be loaded first.
importArticles({
    type: "script",
    articles: [
        "u:c:User:SuperSajuuk/FileModule.js", // Imports a File Module script (copied from 452's global js)
        "u:dev:MediaWiki:UnsafeScripts/code.js", // Needed for some stuff, load it first.
        "u:dev:MediaWiki:TabKeyInserter/code.js",
        "u:dev:MediaWiki:AbuseLogRC.js",
        "u:dev:MediaWiki:WallGreetingButton/code.js",
        "u:dev:MediaWiki:ThreadIndicator/code.js",
        "u:dev:MediaWiki:PortableCSSPad/code.js",
        "u:dev:MediaWiki:UserTags/code.js",
        "u:dev:MediaWiki:ListFiles/code.js",
        "u:dev:MediaWiki:AjaxUndo/code.js",
        "u:dev:MediaWiki:Status/code.js",
        "u:dev:User:UltimateSupreme/AjaxRollback.js",
        "u:dev:MediaWiki:FileUsageAuto-update/code.js",
        "u:dev:MediaWiki:AjaxRC/code.js",
        "u:dev:MediaWiki:PurgeBlogs/code.js",
        "u:dev:MediaWiki:NoImageLightbox/code.js",
        "u:dev:MediaWiki:QQX/code.js"
    ]
});

//
// END: All Scripts Loader
//