User:Gguigui1/global.js

/* Add LookUpContribs in all contributions page */ /* $( document ).ready(function { var page = mw.config.get('wgPageName'); var specialpage = mw.config.get('wgCanonicalSpecialPageName'); var href; var name = page.split('/')[1]; if (specialpage === "Contributions" && page.split('.').length != 4) { href = 'http://community.wikia.com/wiki/Special:LookUpContribs?target=' + name;  $('#WikiaMainContent a').each(function { var attrs = $(this).attr('title'); if (attrs === 'Voir les modifications globales de l\'utilisateur') { return false; } });  var linktitle = "gérer les droits";	$('#contentSub').find('a').each(function { if ($(this).html == "gérer les droits") { $(this).after(' • Recherche de contributions'); } }); } }); var log = function( message ) { alert(message); }; var qtUserPageTemplate = ''; var qtEnableUserPageOverwrite = true; AjaxDiff = { expiry: "3 days", reason: "Spam" }; QuickContribs = { expiry: "3 days", reason: "Spam" }; importArticles({   type: 'script',    articles: [        "u:dev:QuickToolsv2/code.js",        'u:dev:WHAM/code.2.js',        'u:dev:Quick_Management/code.js',        "w:c:dev:RevealAnonIP/usercode.js",        'u:dev:QuickCreateUserPage/code.js',        'u:dev:PortableCSSPad/code.js',        "u:dev:AjaxDiff/code.js",        "u:dev:QQX/code.js",        'u:dev:QuickLogs/code.js',        "u:dev:MultiUpload/code.js",        'u:dev:QuickThreads/code.js',        'u:dev:DiffAnchored/code.js',        "u:dev:QuickContribs/code.js"    ] }); /* function addadoptionsrights { var qUserName = encodeURIComponent($('#Name').val); if (qUserName == null) { return false; }   var reason = $('#motif').val; if ($('#bureaucrat').attr('checked')) { apiuserrights(qUserName, ['sysop', 'bureaucrat'], null, reason, log, log); } else { apiuserrights(qUserName, ['sysop'], null, reason, log, log); } } var quickadoptionHTML = '\  \ \       Pseudo de la personne : \  \ Donner les droits bureaucrate ?: \  \ Motif : \  \ \ '; function quickadoption { $.showCustomModal('Adoption de wiki', quickadoptionHTML, {       id: 'adoption',        width: 200,        buttons: [{            id: 'startButton',            message: 'Adoption',            defaultButton: true,            handler: function  {                addadoptionsrights;                }        }, {            message: 'Annuler',            handler: function {                $('#adoption').closeModal;            }        }]    }); } $( document ).ready(function {	if( skin == 'oasis' ) { $('Adoption ').appendTo('#WikiaBarWrapper .toolbar > .tools'); $('#quickadoption').attr('onclick', 'quickadoption');		} var chemin = window.location.href; chemin = chemin.replace('http://',''); var cheminprefix = chemin.split('.',2); if (cheminprefix[0] !== "fr") { console.log('Disable the button...');  $('#quickadoption').attr('disabled', true);  console.log('Button disabled.'); } });