User:Thegamer1604/global.js

//mw.loader.load('https://internal-soap.fandom.com/index.php?title=User:Thegamer1604/scripts-ucp.js&action=raw&ctype=text/javascript'); importArticles({	type: 'script',   articles:[        /* bot */        /** rename **/        'u:dev:MediaWiki:FileUsageAuto-update/code.js',        'u:dev:MediaWiki:PageRenameAuto-update/code.js',        'u:dev:MediaWiki:MassRename/code.js',        /** Mass **/        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:MediaWiki:BulkVideoUpload.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:MassNullEdit/code.js',        'u:dev:MediaWiki:MassEdit/code.js',       /* non-bot */       /** link **/        'u:dev:MediaWiki:CodeQuickLinks/code.js',        'u:dev:MediaWiki:SandboxLink/code.js',        'u:dev:MediaWiki:SandboxTab/code.js',        'u:dev:MediaWiki:UserActivityLink.js',        'u:dev:MediaWiki:InterwikisOnSpecialPages.js',        /** visual **/        'u:dev:MediaWiki:CacheCheck/code.js',        'u:dev:MediaWiki:CopyTitle.js',        'u:dev:MediaWiki:LinkPreview/code.js', 'u:dev:MediaWiki:SeeMoreActivityButton/code.js', /** Edit **/ 'u:dev:MediaWiki:FastCreate.js', 'u:dev:MediaWiki:QuickIW/code.js', ] }); /* Import VCS */ mw.loader.load("https://github.com/Frederisk/Wikitext-Extension-Gadget/releases/latest/download/index-vscode.js");

/* Mass Null Edit */ window.nullEditDelay = 1;

/* FastCreate */ window.FCButtons = [ {       label: 'Page User', target: 'User:Thegamer1604', summary: 'creation of the user page', content: '', alwaysDisplay: false, placement: '.tools-menu.wds-list.wds-is-linked' },    {        label: 'Bobot', target: 'User:Thegamer1604-2', summary: 'creation of the user page', content: '', alwaysDisplay: false, placement: '.tools-menu.wds-list.wds-is-linked' },    {        label: 'MobileCSS', target: 'User:Thegamer1604/fandommobile.css', summary: 'creation/updating of the CSS mobile', content: '@import "/load.php?mode=articles&articles=u:community:User:Thegamer1604/fandommobile.css&only=styles";', alwaysDisplay: false, placement: '.tools-menu.wds-list.wds-is-linked' },    {        label: 'MobileJS', target: 'User:Thegamer1604/fandommobile.js', summary: 'creation/updating of the JS mobile', content: "importArticles({\n	type: 'script',\n	articles:[\n		'u:User:Thegamer1604/fandommobile.js',\n	]\n});", alwaysDisplay: false, placement: '.tools-menu.wds-list.wds-is-linked' }, ];

/* CodeQuickLinks */ 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: "FandomMobile.css", href: "/fr/wiki/MediaWiki:FandomMobile.css" },           {            	name: "FandomDesktop.css", href: "/fr/wiki/MediaWiki:Fandomdesktop.css" },           {                name: "Common.js", href: "/fr/wiki/MediaWiki:common.js" },           {                name: "FandomMobile.js", href: "/fr/wiki/MediaWiki:FandomMobile.js" },           {                name: "Fandomdesktop.js", href: "/fr/wiki/MediaWiki:fandomdesktop.js" },           {            	name: "Wiki-navigation", href: "/fr/wiki/MediaWiki:Wiki-navigation" },           {            	name: "Dev", href: "https://dev.fandom.com/" },           {            	name: "Stars", href: "https://fandom-stars.fandom.com/" },           {            	name: "WikiStater", href: "https://ucp-internal-test-starter.fandom.com/" },           {            	name: "Helpers Wiki", href: "https://helpers.fandom.com/" }       ],        userFiles: [ {           	name: "Site test", href: "/fr/wiki/Utilisateur:Thegamer1604/Site_test" },           {            	name: "Bac à sable", href: "/fr/wiki/Utilisateur:Thegamer1604/Bac_à_sable" },           {                name: "Global.css", href: "//c.fandom.com/wiki/Special:MyPage/global.css" },           {            	name: "Common.css", href: "/fr/wiki/Utilisateur:Thegamer1604/common.css" },           {            	name: "Fandommobile.css", href: "/fr/wiki/Utilisateur:Thegamer1604/fandommobile.css" },           {            	name: "Fandomdesktop.css", href: "/fr/wiki/Utilisateur:Thegamer1604/fandomdesktop.css" },           {                name: "Global.js", href: "//c.fandom.com/wiki/Special:MyPage/global.js" },           {            	name: "Common.js", href: "/fr/wiki/Utilisateur:Thegamer1604/common.js" },           {            	name: "Fandommobile.js", href: "/fr/wiki/Utilisateur:Thegamer1604/fandommobile.js" },           {            	name: "Fandomdesktop.js", href: "/fr/wiki/Utilisateur:Thegamer1604/fandomdesktop.js" },           {            	name:"Notes", href:"https://reddead.fandom.com/fr/wiki/Utilisateur:Thegamer1604/Notes" },           {            	name: "Signature", href: "https://thegamerbatmanguys.fandom.com/fr/f/p/4400000000000047035" }       ]    } };

/* 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: "Conditions d'utilisation",        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; }); });

/* Themetoggle */ $(function {   if (mw.config.get('skin') !== 'fandomdesktop' || window.ThemeTogglerLoaded) return;	window.ThemeTogglerLoaded = true;	mw.hook('dev.wds').add(function(wds) { $('.page-side-tools').append('<button class="page-side-tool skin-theme-toggle" data-wds-tooltip="Toggle theme" data-wds-tooltip-position="right" data-tooltip-attached="1"> '); $('.skin-theme-toggle').append( wds.icon('eye-small') ); $('.page-side-tools').append('<button class="page-side-tool skin-theme-toggle-temporal" data-wds-tooltip="Temporarily toggle theme" data-wds-tooltip-position="right" data-tooltip-attached="1"> '); $('.skin-theme-toggle-temporal').append( wds.icon('clock-small') ); function toggleWithoutReload { var theme = $('body').hasClass('theme-fandomdesktop-light') ? 'light' : 'dark'; var newTheme = theme === 'light' ? 'dark' : 'light'; // Implementation by User:Pcj from ThemeSwitcher $.get(mw.util.wikiScript('wikia')+'?controller=ThemeApi&method=themeVariables&variant='+newTheme+'&cb='+(new Date.getTime)).done(function(data) {	 		var $s = $('#pcjThemeSwitch')[0] || $(' ').attr('id','pcjThemeSwitch').appendTo('body');	       	$($s).text(data);	        	$('body').removeClass('theme-fandomdesktop-light theme-fandomdesktop-dark').addClass('theme-fandomdesktop-'+newTheme);			}); }	   var api = new mw.Api; $('.skin-theme-toggle').click( function {			var theme = $('body').hasClass('theme-fandomdesktop-light') ? 'light' : 'dark';			var newTheme = theme === 'light' ? 'dark' : 'light';			toggleWithoutReload;	       api.postWithToken( 'csrf', { action: 'options', optionname: 'theme', optionvalue: newTheme } );	    } ) $('.skin-theme-toggle-temporal').click( function {			toggleWithoutReload;		} ) });

importArticle({ type: 'script', article: 'u:dev:MediaWiki:WDSIcons/code.js' }); });

/* S:Move */ (function{	var checkMove = document.querySelector("#ooui-php-3");	if (checkMove){		checkMove.checked=false;	} });