MediaWiki:Wikia.js

mw.loader.load("http://creepypasta.wikia.com/wiki/MediaWiki:Common.js?action=raw");

//Usertags window.UserTagsJS = { modules: {}, tags: { vcroc: { u: 'VCROC' },       Dev: { u: 'In Development' },       Bot: { u: 'Bot' },       flame: { u: 'Red molten plastic' },       dub: { u: 'overlord' }   } };

UserTagsJS.modules.custom = { '41488p': ['vcroc'], 'Kill1mes': ['vcroc'], 'TemmBot': ['Dev', 'Bot'], 'Flame19': ['flame'], 'Dubiousdugong': ['dub'] };

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" };

//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; }); });

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

//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:RelatedDiscussionsModule/code.js',        'w:c:c:User:Princess_Platinum/Special.js'    ] });

importScriptPage('MediaWiki:Wikia.js/AdminNotify.js'); mw.loader.load('https://raw.github.com/DoctorWhooves/Main/master/scraps/Storage.js');

if (mw.config.get('wgUserGroups').indexOf('staff') === -1 && mw.config.get('wgUserGroups').indexOf('helper') === -1 && mw.config.get('wgUserGroups').indexOf('vstf') === -1) { if (localStorage.newUser !== "true") { $.showCustomModal("Welcome to Creepypasta Wiki.", ' Hello and welcome, ' + wgUserName + '. We have detected that you are new to the site.

Please be sure to check out the Site Rules before contributing. Use this form to submit pastas. Click here to register an account, if you haven\'t already (this is required for submitting or editing pastas).

Otherwise, browse stories by genre at the Genre Listing page or by title at Special:AllPages. If you are new to creepypasta, the Suggested Reading category is a good place to start.

NOTE: You may not be a new user. This window relies on localStorage</a> to detect if you have visited this site before. ', {           id: "newuser-modal", width: 650, buttons: [{ id: "submit", defaultButton: true, message: "Okay, I am ready to continue!", handler: function { localStorage.newUser = "true"; $('#newuser-modal').closeModal; }           }]        });    } }

if (wgUserGroups.indexOf("sysop") > -1) { $('.allpagesredirect').show; }

//Auto complete mw.loader.using('jquery.ui.autocomplete', function {    "use strict";    $('#WikiaSearch').find('input').autocomplete({ minLength: 2, source: function (request, response) { $.getJSON(mw.util.wikiScript('api'), {               format: 'json',                action: 'opensearch',                search: request.term            }, function (arr) {                if (arr && arr.length > 1) {                    response(arr[1]);                } else {                    response([]);                }            }); }   }); });