MediaWiki:Wikia.js

$(document).ready(function {    //Usertags    window.UserTagsJS = {        modules: {},        tags: {            vcroc: {                u: 'VCROC'            },            v: {                u: 'Head of VCROC'            },            princess: {                u: 'Princess'            },            sarah: {                u: 'foxgirl'            },            Dev: {                u: 'In Development'            },            Bot: {                u: 'Bot'            },            wdev: {                u: 'Developer'            },        }    };    UserTagsJS.modules.custom = {        'LOLSKELETONS': ['v'],        'WhyAmIReadingThis': ['vcroc'],        '41488p': ['vcroc'],        'Coffee Shop Corporate Raider': ['vcroc'],        'Sloshedtrain': ['v'],        'Kill1mes': ['vcroc'],        'BrownArrow': ['vcroc'],        'Princess Platinum': ['princess', 'wdev'],        'Temmington': ['sarah', 'vcroc'], 'TemmBot': ['Dev', 'Bot'],

};

UserTagsJS.modules.autoconfirmed = false;

UserTagsJS.modules.autoconfirmed = false;

UserTagsJS.modules.inactive = 60;

UserTagsJS.modules.mwGroups = ['bureaucrat'];

UserTagsJS.modules.metafilter = { 'sysop': ['bureaucrat'], 'newuser': ['user'], };

//Username Replace (rewritten by princess platinum) $(document).ready(function {        $("span.insertusername").html(wgUserName);    });

//Title Rewrite (rewritten by princess platinum) $(document).ready(function {        var newTitle = $("#title-meta").html;        if (!newTitle) return;        var edits = $("#user_masthead_since").text;        $(".firstHeading,#WikiaUserPagesHeader h1,#WikiaPageHeader h1").html(newTitle);    });

//Spoiler Alert SpoilerAlert = { question: 'This page contains content that is NSFW and may not be suitable for all audiences. Do you wish to continue to view this page?', yes: 'Yes, I do', no: 'No, I do not', isSpoiler: function { return -1 !== wgCategories.indexOf('NSFW'); }   };

//Lock old blogs window.LockOldBlogs = { expiryDays: 30, expiryMessage: "This blog is considered archived because it hasn\'t been commented on in over 30 days, please don\'t bump this blog!", nonexpiryCategory: "Site Rules" };

/*Discussion Module importArticle({       type: "style",        article: "w:dev:RelatedDiscussionsModule/code.css"    });

$(function {        if (!$('#mw-content-text > #RelatedForumDiscussion').length) {            return;        }

var userconfig = (window.RelatedDiscussionsConfig) ? window.RelatedDiscussionsConfig : {}; var config = $.extend(true, {           'en': "Related Discussions",            'es': "Hilos relacionados",            'hu': "Kapcsolódó beszélgetések",            'pl': "Podobne Dyskusje"        }, userconfig); var title = (wgContentLanguage in config) ? config[wgContentLanguage] : config.en;

$('#WikiaRail > .LatestPhotosModule').after($('#mw-content-text > #RelatedForumDiscussion').addClass('module')); $('#RelatedForumDiscussion > h2').replaceWith($('#WikiaRail > #RelatedForumDiscussion > h2').html.split('')[0] + ' ' + title + ' '); });   //Vote Counter by princess platinum    $(function  { var Support = $('.msg-body').find('p').find('.support').length; var Oppose = $('.msg-body').find('p').find('.oppose').length; $('#support-vote').text(Support); $('#oppose-vote').text(Oppose); });

//Sandbox var resetButton = 'Reset Sandbox';

$('.reset-container').append(resetButton).click(function {        var token = mw.user.tokens.values.editToken;        var text = '';        var url = wgServer + '/api.php?action=edit&title=Project:Sandbox&text=' + encodeURIComponent(text) + '&token=' + encodeURIComponent(token);        $.post(url, function  { alert("Page Cleaned"); location.reload; });   });

//Small import importScriptPage('User:Princess Platinum/Sandbox.js');

//Anons window.RevealAnonIP = { permissions: ['rollback', 'sysop', 'bureaucrat', 'VCROC'] };

//Special:Sandbox if (wgPageName == "Special:Sandbox") {

var sandbox = ' Save State Load State';

document.getElementById('WikiaArticle').innerHTML = sandbox;

function saveDoc { var Document = document.getElementById('sandbox-area').value || 'NaN'; if (typeof(Storage) !== "undefined") { localStorage.sandbox = Document; document.getElementById("input-box").value = "Document Saved"; location.reload; } else { document.getElementById("sandbox-area").value = "Please use a modern browser"; }       }

function getDoc { if (typeof(Storage) !== "undefined") { document.getElementById("sandbox-area").value = localStorage.sandbox; } else { document.getElementById("sandbox-area").value = "Please use a modern browser"; }       }    }

//Import Articles importArticles({       type: 'script',        articles: [           'w:c:dev:UserTags/code.js',            'w:c:dev:LockOldBlogs/code.js',            'w:c:dev:SpoilerAlert/code.js',           'w:c:dev:RevealAnonIP/code.js',            'w:c:dev:SexyUserPage/code.js',            'MediaWiki:Wikia.js/Rating.js', ]    }); });