User:Thegamer1604/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:LinkPreview/code.js',        'u:dev:MediaWiki:SandboxTab/code.js',        /*Diff*/        'u:dev:MediaWiki:SeeMoreActivityButton/code.js',        'u:dev:MediaWiki:SandboxLink/code.js',        'u:dev:MediaWiki:UserActivityLink.js',        'u:dev:MediaWiki:CacheCheck/code.js',        'u:dev:MediaWiki:MassNullEdit/code.js',        'u:dev:MediaWiki:QuickIW/code.js',        'u:dev:MediaWiki:CodeQuickLinks/code.js',    ] });

window.customCodeQuickLinks= { replaceAllDefaultLinks: true, showIcon: false, linkSet: { siteFiles: [ {               name: "ImportJS", href: "/fr/wiki/MediaWiki:ImportJS" },           {                name: "Common.css", href: "/fr/wiki/MediaWiki:common.css" },           {                name: "Wikia.css", href: "/fr/wiki/MediaWiki:Wikia.css" },           {            	name: "Wiki-navigation", href: "/fr/wiki/MediaWiki:Wiki-navigation" },           {            	name: "Dev", href: "https://dev.fandom.com/" }       ],        userFiles: [ {           	name: "Site test", href: "/fr/wiki/Utilisateur:Thegamer1604/Site_test" },           {            	name: "Bac à sable", href: "/fr/wiki/Utilisateur:Thegamer1604/Bac_à_sable" },           {            	name: "Votre activité", href: "//c.fandom.com/wiki/Special:UserActivity" },           {                name: "Global.js", href: "//c.fandom.com/wiki/Special:MyPage/global.js" },           {                name: "Global.css", href: "//c.fandom.com/wiki/Special:MyPage/global.css" },           {            	name: "Common.js", href: "/fr/wiki/Utilisateur:Thegamer1604/common.js" },           {            	name: "Common.css", href: "/fr/wiki/Utilisateur:Thegamer1604/common.css" },           {            	name:"Notes", href:"https://reddead.fandom.com/fr/wiki/Utilisateur:Thegamer1604/Notes" }       ]    } };

/*Multiupload*/ mw.loader.using(['site', 'mediawiki.util']).then(function {   i18n = {        multiupload: "Import multiple :",        yes: "Oui",        no: "Non",        sourcefiles: "Choisir les fichiers :",        uploadfiles: "Importer les fichiers",        nofiles: "Choisir des fichiers d'abord.",        summary: "Description",        license: "Licence",        uploading: "Import en cours...",        uploaded: "Importés :",        failed: "Échoués :",        done: "Fait."    };    if (mw.config.get("wgCanonicalSpecialPageName")!=="Upload") return;        $("#wpUploadFile").parent.parent.addClass("regularFileSelect");    $("tr.regularFileSelect").before(' '+i18n.multiupload+'   '+i18n.yes+'    '+i18n.no+'  ');    $("tr.regularFileSelect").after(''+i18n.sourcefiles+'   '); $("input[name='wpUpload']").addClass("regularFileSelect"); $("#wpDestFile").parent.parent.addClass("regularFileSelect"); $("#wpIgnoreWarning").parent.parent.addClass("regularFileSelect"); $("span.mw-htmlform-submit-buttons").append(''); $("input[name='multipleFiles']").change(function{       if (this.value===i18n.yes) {            $(".regularFileSelect").hide;            $(".multipleFileSelect").show;        }        else {            $(".regularFileSelect").show;            $(".multipleFileSelect").hide;        }    }); $("#multiFileSubmit").click(function {       files = $("#multiupload")[0].files;        if (files.length === 0) {            alert(i18n.nofiles);            return false;        }        if ($("#wpLicense option:selected").val === "") {            alert(i18n.nolicense);            return false;        }        summary = $("#wpUploadDescription").val;        if (summary !== "") summary = "== "+i18n.summary+" ==\n"+summary;        license = "== "+i18n.license+" ==\n"+$("#wpLicense option:selected").prop("title");        text = summary + "\n" + license;        watch = "preferences";        if ($("#wpWatchthis").is(":checked")) watch = "watch";        else watch = "nochange";        curFile = 0;        $("#firstHeading").text(i18n.uploading);        $("#mw-content-text").html(" "+i18n.uploaded+"  "+i18n.failed+"  ");        function gNF {            if(curFile>files.length) { $("#mw-content-text").append(" "+i18n.done+" "); return; }           if(files[curFile] === undefined) { curFile++; gNF; return; }           $.ajax({url: mw.util.wikiScript('api'),data:{action:'query',meta:'tokens',format:'json'},dataType:'json'}).done(function(data) {                fd = new FormData;                fd.append("action","upload");                fd.append("token",data.query.tokens.csrftoken);                fd.append("filename",files[curFile].name);                fd.append("file",files[curFile]);                fd.append("text",text);                fd.append("watchlist",watch);                fd.append("ignorewarnings",1);                fd.append("format","json");                $.ajax({ url: mw.util.wikiScript('api'), method:'POST', data:fd, cache:false, contentType:false, processData:false, type:'POST' }).done(function(d){ if (d.error == undefined) { $("#mw-content-text > ul").append(''+d.upload.filename+'</li>'); }                     else { $("#multiUploadFailed ul").append('<li>'+files[curFile].name+'</li>'); $("#multiUploadFailed").show; }                   curFile++; gNF; }).fail(function(d) { $("#multiUploadFailed ul").append('<li>'+files[curFile].name+'</li>'); $("#multiUploadFailed").show; curFile++; gNF; });           });        }        gNF; }); });