Jump to content

User:Brandybradham/global.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/**‌‍‍
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see [[meta:TemplateScript]]
 * @update-token [[File:Pathoschild/templatescript.js]]
 */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js');


/**
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see https://meta.wikimedia.org/wiki/TemplateScript
 * @update-token [[File:Pathoschild/templatescript.js]]
 */
// <nowiki>
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
	pathoschild.TemplateScript.add([
		// add your own templates or scripts here
		{ name: 'welcome', template: '{{subst:welcome}} ~~~~', position: 'after', editSummary: 'welcome!', forNamespaces: 'user talk' },
	]);
});
// </nowiki>


$(document).ready(function() {
    if (mw.config.get("wgAction") !== "edit" && mw.config.get("wgAction") !== "submit") {
        setInterval(function(){
            $('.global-navigation-container').css('background-color', $('.navbackground').css('background-color'));
        },1000);
    }
    $('[data-canonical="wikiactivity"]').attr('href', '/wiki/Special:RecentChanges').text('Recent Changes');
    $('#WikiaArticleComments .edited-by a[href*="/wiki' + '/Special:Contributions"]').each(function() {
        $(this).html(this.href.substring(this.href.lastIndexOf('/') + 1));
    });
    $('#UserProfileMasthead > div.masthead-info > div.masthead-info-lower > ul.wikis > ul > li:nth-child(1) > a, #UserProfileMasthead > div.masthead-info > div.masthead-info-lower > ul.wikis > ul > li:nth-child(2) > a, #UserProfileMasthead > div.masthead-info > div.masthead-info-lower > ul.wikis > ul > li:nth-child(3) > a, #UserProfileMasthead > div.masthead-info > div.masthead-info-lower > ul.wikis > ul > li:nth-child(4) > a').each(function() {
        var lnk2 = this.href;
            this.href = lnk2.replace("User_talk:", "Special:Contributions/");
    });
    $('#AccountNavigation > li > .subnav > li:first').after(
        $('<li/>').append('<a href="/wiki/Special:Contributions/Jr_Mime">My contributions</a>')
    );
});
 
mw.loader.load('http://internal.vstf.wikia.com/wiki/User:Jr_Mime/scripts.js?action=raw&ctype=text/javascript&templates=expand');
var fdButtons = [];
fdButtons[fdButtons.length] = {'summary': '[[w:help:vandalism|vandalism]]', 'label': 'V'};
fdButtons[fdButtons.length] = {'summary': '[[w:help:spam|spam]]', 'label': 'S'};
fdButtons[fdButtons.length] = {'summary': 'cleanup', 'label': 'C↑'};
fdButtons[fdButtons.length] = {'summary': 'Violation of the ToU', 'label': 'ToU'};
importScriptPage('FastDelete/code.js', 'dev');
window.ajaxPages = ["Istimewa:Perubahan_terbaru","Especial:CambiosRecientes", "Speciale:UltimeModifiche", "Special:Log/newusers", "Special:RecentChanges", "Special:NewPages", "Special:WikiActivity", "Special:AbuseLog", "Spécial:Modifications_récentes", "Special:Log/block", "Special:Log/chatban", "Special:Log/upload", "Especial:Mudanças_recentes", "Служебная:RecentChanges"];
window.ajaxCallAgain = window.ajaxCallAgain || [];
window.ajaxCallAgain.push(botrollback);
importScriptPage('AjaxRC/code.js', 'dev');
 
function botrollback() {
    if (wgCanonicalSpecialPageName != 'Contributions') {
        $(function() {
            $('.mw-rollback-link').each(function() {
                var a = $(this).find('a').css({
                    color: $('.navbackground').css('background-color'),
                }),
                    b = '<a href="' + a.attr('href') + '&bot=1" title="-Rollback- reverts edit(s) by this contributor -- botted" style="color: ' + $('.navbackground').css('background-color') + '">bot</a>';
                $(this).html('[').after(a, ' | ', b, ']');
            });
        });
    }
}
OFPoptions = {'showlinks': true};
massRenameDelay = 500;
massRenameSummary = 'automatic';
importArticles({
    type: "script",
    articles: [
        "u:a:MediaWiki:Gadget-HotCat.js",
        "u:c:User:Jr Mime/buttons.js",
        "u:c:User:Ozuzanna/chatconnect.js",
        "u:dev:AjaxBatchDeleteV2/code.js",
        "u:dev:CacheCheck/code.js",
        "u:dev:CategoryRenameAuto-update/code.js",
        "u:dev:FileUsageAuto-update/code.js",
        "u:dev:MassNullEdit/code.js",
        "u:dev:MiniComplete/code.js",
        "u:dev:PortableCSSPad/code.js",
        "u:rs:User:Quarenon/autowelcome.js",
        "u:rs:User:Suppa chuppa/undoplus.js",
        "u:dev:MassRename/code.js",
        "u:dev:ListFiles/code.js"
    ]
});
$(document).ready(function() { setInterval(function() {
    $("#WikiaPageHeader > div > div.header-column.header-title > h1").after($("#WikiaPageHeader > a:nth-child(8), #WikiaPageHeader > a:nth-child(7), #WikiaPageHeader > a:nth-child(6), #WikiaPageHeader > a:nth-child(5), #WikiaPageHeader > a:nth-child(4), #WikiaPageHeader > a:nth-child(3), #WikiaPageHeader > nav"));
    $("#WikiaPageHeader > div.header-container > div.header-column.header-title > a:nth-child(8), #WikiaPageHeader > div.header-container > div.header-column.header-title > a:nth-child(7), #WikiaPageHeader > div.header-container > div.header-column.header-title > a:nth-child(6), #WikiaPageHeader > div.header-container > div.header-column.header-title > a:nth-child(5), #WikiaPageHeader > div.header-container > div.header-column.header-title > a:nth-child(4), #WikiaPageHeader > div.header-container > div.header-column.header-title > a.wikia-button.comments.secondary.talk, #WikiaPageHeader > div.header-container > div.header-column.header-title > nav").after(" ");
},1000);});
importScriptPage("OldFilePages/code.js","dev");



//  _________________________________________________________________________________________
// |                                                                                         |
// |                    === WARNING: GLOBAL GADGET FILE ===                                  |
// |                  Changes to this page affect many users.                                |
// | Please discuss changes on the talk page or on [[Wikipedia_talk:Gadget]] before editing. |
// |_________________________________________________________________________________________|
//
// Imports [[User:Cacycle/wikEd.js]]
// wikEd is a full-featured in-browser editor for Wikipedia, see [[User:Cacycle/wikEd]]

// disable loading for IE, not needed, but might save a few milliseconds
if ( navigator.appName !== 'Microsoft Internet Explorer' ) {
  // load [[User:Cacycle/wikEd]] in-browser text editor
  importScript('User:Cacycle/wikEd.js');
}