User:Shodai Tsuchi/scripts.js

// Chat hack importScriptPage('User:Joeytje50/tabinsert.js', 'rs');

// Imports Scripts importArticles({   type: 'script',    articles: [        'u:dev:AjaxRC/code.js',        'u:dev:PersistentParameters/code.js',        'u:dev:LastEdited/code.js',        'w:c:wikimarks:Client.js',        'u:dev:View_Source/code.js',        'u:dev:QuickDiff/code.js',        'u:dev:QuickToolsv2/code.js',         'u:dev:QuickTemplate/code.js',    ] });

// Skins $('.user-menu > li:has(a[data-id="preferences"])') .after('Monobook' +   'WikiaMobile' +    'QQX' );

// Custom edit buttons if (mw.toolbar) { mw.toolbar.addButton(       'http://static1.wikia.nocookie.net/__cb20070329064845/central/images/2/23/Button_code.png',        'Code',        ' ',        '',        'mw-editbutton-code'    ); }

// View Source mw.util.addCSS(   '#source-code, #source-toc {' +        'font-family: monaco, monospace !important;' +    '}' +    '#source-code > a {' +        'color: ' + $('a').css('color') + ' !important;' +        'font-weight: bold;' +    '}' );

// LastEdited - w:User:Slyst window.lastEdited = { avatar: true, size: false, diff: true, comment: true, time: 'timeago', lang: 'pt-br', namespaces: { include: [], exclude: [] },   pages: [] };

// AJAX window.ajaxRefresh = 3000; AjaxRCRefreshText = 'AJAX'; AjaxRCRefreshHoverText = 'Automaticamente recarregar a página'; window.ajaxPages = [ "Special:WikiActivity", "Special:RecentChanges", "Special:Watchlist", "Special:Log", "Special:Contributions", "Special:Block", "Special:Unblock" ]; batchDeleteDelay = 10; var qtUserPageTemplate = ''; var qtEnableUserPageOverwrite = true;

// FastDelete Buttons importScriptPage('FastDelete/code.js', 'dev'); var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'vandalism', 'label': 'V' }; fdButtons[fdButtons.length] = { 'summary': 'spam', 'label': 'S' }; fdButtons[fdButtons.length] = { 'summary': 'plágio', 'label': 'P' }; fdButtons[fdButtons.length] = { 'summary': 'cleanup', 'label': 'C↑' }; fdButtons[fdButtons.length] = { 'summary': 'Violation of the ToU', 'label': 'ToU' }; fdButtons[fdButtons.length] = { 'summary': 'Sem sentido', 'label': 'SS' }; fdButtons[fdButtons.length] = { 'summary': 'Fanon content', 'label': 'FC' }; fdButtons[fdButtons.length] = { 'summary': 'Sem necessidade', 'label': 'SN' };

if (wgDBname == "wikia") { $("link[rel='shortcut icon'").attr("href",       "http://vignette2.wikia.nocookie.net/monchbox/images/f/f3/Icon-staff.png"    ); }

// Special:CreatePage $(function {	if ( !document.getElementById( 'ca-skins' ) ) {		if ( skin === 'oasis' || skin === 'monobook' ) {		$(window).load(function { $('a.createpage').off('click').attr('href', '/wiki/Special:CreatePage'); });	}   } });

// move edit links to after header $('.editsection').each(function {    $(this).css({ 'float': 'none', 'padding-left': '1em', 'display': 'inline' }).parent.append(this); }); // if 'useskin' parameter exists, set it as a cookie var customSkin = mw.util.getParamValue('useskin'); if (customSkin !== null) { $.cookie('useskin', customSkin, {   domain: mw.config.get('wgCookieDomain'),    path: mw.config.get('wgCookiePath')  }); } // disable redirect links $('.mw-redirect, .allpagesredirect > a').each(function {  var link = new mw.Uri(this.href);  link.extend({ redirect: 'no' }); $(this).attr('href', link.toString); }); // don't create redirect when moving files if (mw.config.get('wgPageName').indexOf('Special:MovePage/File:') !== -1) { $('#wpLeaveRedirect').prop('checked', false); } $(window).load(function {  // add 'used templates' link in wide-mode edit panel  if (mw.config.get('wgAction') === 'edit') {    $('.text-links').clone(true).css('display', 'none').appendTo('.checkboxes').find('a').html('Used templates');  } });

// Original Code by Uberfuzzy. Fixed and formatted by Shodai Tsuchi. if (mw.config.get('skin') === 'oasis') { $('.user-menu > li:has(a[data-id="preferences"])') .after('Refresh'); }

function Purge { $.get('/index.php?title=' + encodeURIComponent ( wgPageName ) + '&action=purge', function {           location.reload(true);        }); $('html, body').css({           display: 'block',            overflow: 'hidden'        }); $('<div style="background: url(\'/skins/common/images/ajax.gif\') no-repeat fixed center center white;height:100%;left:0;opacity:0.25;position:absolute;top:0;width:100%;z-index:1000000000;"> ').appendTo(document.body) .css('height', $(window).height); }