MediaWiki:Common.js/Warnings.js

// Spoiler Warning For forms if (mediaWiki.config.get('wgAction') === 'formedit') { mediaWiki.loader.using('mediawiki.api', function {        new mediaWiki.Api.get({ action: 'parse', page: 'Template:EditPageNotice', prop: 'text' }, {               ok: function (json) { $('#mw-content-text').prepend(json.parse.text['*']); }           });    }); }

$(function {    if (skin === "oasis" || skin === "wikia") {        if (wgNamespaceNumber > 0 && wgNamespaceNumber % 2 == 1 && /^.+\/Archive \d+$/.test(wgTitle)) {            // Archive pages are not meant to be edited so lower the priority of the edit button.            var $edit = $('#WikiaPageHeader .wikia-menu-button a:first');            $edit.find('img').remove;            $('').append($edit)                .appendTo($('#WikiaPageHeader .wikia-menu-button .WikiaMenuElement'));            $('Archive Page')                .prependTo('#WikiaPageHeader .wikia-menu-button')                .click(function  { $(this).parent.find('> .drop').click; });           $('#WikiaPageHeader .wikia-menu-button .WikiaMenuElement #ca-edit').css({ color: '#999', fontStyle: 'italic' }).attr({ title: "This page is an archive and should not be edited." });

if (wgAction === "edit") { var $n = $('This is an archive, it is NOT a talkpage. Please refrain from editing it without a good reason.'); $('#EditPageEditor .editpage-notices ul').empty.append($n); }       }    } });