User:Emperor Jarjarkine/global.js

// PurgeButton PurgeButtonText = 'Purge'; importArticles({   type: 'script',    articles: [        'u:dev:FastDelete/code.js',        'u:dev:QuickDelete/code.js',        'u:dev:PurgeButton/code.js'    ] });

//================================================================================================= // //                                        IMPORT D'ARTICLES // //================================================================================================= importArticles({	type: 'script',	articles: [		'u:dev:ReferencePopups/code.js',		'u:dev:DynamicImages/code.js',		'u:dev:ExtendedNavigation/code.js',		'u:zh.pad:MediaWiki:CountDown.js', //		'MediaWiki:Common.js/Snow.js', //		'u:c:MediaWiki:Snow.js',		'u:dev:Standard_Edit_Summary/code.js',               'w:c:dev:TopEditors/code.js',                'u:dev:EditcountTag/code.js',                'u:dev:FileUsageAuto-update/code.js'    ] }, {	type: "style",		articles: ['u:zh.pad:MediaWiki:CountDown.css'] }); importScriptPage( 'AjaxDiff/code.js', 'dev' ); importArticles({   type: 'script',    articles: [         'u:dev:View_Source/code.js'    ] }); importScriptPage('MediaWiki:Gadget-purgebutton.js', 'starwars'); importScriptPage('MediaWiki:Gadget-ajaxundo.js', 'starwars'); importScriptPage('MediaWiki:Gadget-inactiveusers..js', 'starwars'); importArticles({    type: 'script',     articles: [         'u:dev:Quick_Management/code.js'     ] }); importScriptPage('WHAM/code.2.js', 'dev'); importScriptPage('ContribsLink/code.js', 'dev'); importArticles( {    type: 'script',     articles: [         // ...         'u:dev:LastEdited/code.js',         // ...     ] } ); importArticles({   type: 'script',    articles: [        // ...        'w:c:dev:ReferencePopups/code.js',        // ...    ] }); /** * Ajoute les contributions et la liste de suivi au menu déroulant des comptes utilisateurs * Auteur original inconnu * * Autres auteurs : Ryan PM et Cqm de RuneScape Wiki + Hulothe */ (function ($, console, document, rswiki) {   'use strict';    // make sure the gadgets property exists    rswiki.gadgets = rswiki.gadgets || {};    rswiki.gadgets.addContribs = function  {        $('#AccountNavigation > li > .subnav > li:first-child').after( $('').attr({               'id': 'MyContribs'            }).append(                $('').attr({ 'href': '/wiki/Special:MyContributions' }).text('Contributions')           ), $('').attr({               'id': 'Liste'            }).append(                $('').attr({ 'href': 'http://starwars.wikia.com/wiki/Special:WikiActivity' }).text('Wook')               ), $('').attr({               'id': 'ct'            }).append(                $('').attr({ 'href': 'http://starwars.wikia.com/wiki/Wookieepedia:Consensus_track' }).text('CT')               ), $('').attr({               'id': 'TC'            }).append(                $('').attr({ 'href': 'http://starwars.wikia.com/wiki/Wookieepedia:Trash_compactor' }).text('TC')           ) );   };    $(rswiki.gadgets.addContribs); }(this.jQuery, this.console, this.document, this.rswiki = this.rswiki || {})); var nom_utilisateur_courant = mw.config.get( 'wgUserName' ); var lien_page_discu = "/wiki/User_talk:"+nom_utilisateur_courant; $('.sprite.close-notification + a:contains("de nouveaux messages")').attr('href',lien_page_discu); $('a[data-id*="mytalk"]').attr('href',lien_page_discu); // /** * Originally from https:////en.wikipedia.org/wiki/User:Ucucha/duplinks.js * * Modified to work in both the Wikia and Monobook skins */ $( function($) {   if((wgNamespaceNumber != 0) && (wgNamespaceNumber != 2)) {        // only check links in mainspace and userspace (for userspace drafts)        return;    }    var portletlink;    if ( mw.config.get( 'skin' ) === 'monobook' ) {        portletlink = mw.util.addPortletLink('p-tb', '#', 'Highlight duplicate links', 'ca-findduplicatelinks');    } else {        portletlink = $( '' ).append( $( '' ).attr( 'href', '#' ).text( 'Highlight duplicate links' ) );        $( '#WikiaBarWrapper' ).find( '#my-tools-menu' ).prepend( portletlink );    }    $(portletlink).click( function(e) { e.preventDefault; // create a separate div surrounding the lead // first get the element immediately surrounding the article text. Unfortunately, MW doesn't seem to provide a non-fragile way for that. var content = ".mw-content-ltr"; $(content).prepend(document.createElement('div')); var lead = $(content).children[0]; $(lead).attr('id', 'lead'); $(content).children.each( function {           if(this.nodeName.toLowerCase == 'h2') {                return false;            }            if($(this).attr('id') != 'lead') {                $(lead).append(this);            }            return true;        }); // detect duplicate links mw.util.addCSS(".duplicate-link { border: 1px solid red; }"); var finddups = function { var href = $(this).attr('href'); if(href != undefined && href.indexOf('#') != 0) { if(seen[href]) { $(this).addClass("duplicate-link"); }               else { seen[href] = true; }           }            return true; };       // array to keep track of whether we've seen a link before var seen = []; mw.util.$content.find('p a').not('#lead *, .infobox *, .navbox *').each(finddups); var seen = []; mw.util.$content.find('#lead p a').not('.infobox *, .navbox *').each(finddups); }); } );

// 7.PrivateMessageAlert ///Config var beepSound = 'http://soundbible.com/grab.php?id=1645&type=mp3'; ///Importe importArticles({   type: "script",    articles: [        "u:dev:MediaWiki:PrivateMessageAlert/code.js",    ] });