User:Thegamer1604/global.js

importArticles({   type: 'script',    articles:[        /*bot*/        /***rename***/        'u:dev:MediaWiki:CategoryRenameAuto-update/code.js',        'u:dev:MediaWiki:FileUsageAuto-update/code.js',        'u:dev:MediaWiki:PageRenameAuto-update/code.js',        /***Mass***/        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:MediaWiki:BulkVideoUpload.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:MassEdit/code.js',        'u:dev:MediaWiki:MassNullEdit/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',        /***visual***/        'u:dev:MediaWiki:CacheCheck/code.js',        'u:dev:MediaWiki:CopyTitle.js',        'u:dev:MediaWiki:LinkPreview/code.js',        'u:dev:MediaWiki:MastheadRightsBadge.js', 'u:dev:MediaWiki:SeeMoreActivityButton/code.js', /***Edit***/ 'u:dev:MediaWiki:FastCreate.js', 'u:dev:MediaWiki:QuickIW/code.js', ] }); /*FastCreate*/ window.FCButtons = [    {        label: 'Page User',        target: 'User:Thegamer1604',        summary: 'creation of the user page',        content: ,        alwaysDisplay: true,        placement: '.tools-menu.wds-list.wds-is-linked'    },     {        label: 'Bobot',        target: 'User:Thegamer1604-2',        summary: 'creation of the user page',        content: ,        alwaysDisplay: true,        placement: '.tools-menu.wds-list.wds-is-linked'    },     {        label: 'Mobile',        target: 'User:Thegamer1604/fandommobile.css',        summary: 'creation of the CSS mobile',        content: '\
 * root{\

\n	--theme-page-background-color: #1e0c1b;\ \n	--theme-page-background-color--rgb: 30,12,27;\ \n	--theme-page-background-color--secondary: #291927;\ \n	--theme-page-text-color: #e6e6e6;\ \n	--theme-page-text-color--rgb: 230,230,230;\ \n	--theme-page-text-color--hover: #b3b3b3;\ \n	--theme-link-color: #ffc500;\ \n	--theme-link-color--rgb: 255,197,0;\ \n	--theme-link-color--hover: #997600;\ \n	--theme-link-label-color: #1e0c1b;\ \n	--theme-accent-color: #ffc500;\ \n	--theme-accent-color--rgb: 255,197,0;\ \n	--theme-accent-color--hover: #997600;\ \n	--theme-accent-label-color: #1e0c1b;\ \n	--theme-border-color: #595358;\ \n	--theme-border-color--rgb: 89,83,88;\ \n	--theme-page-text-mix-color: #827981;\ \n	--theme-page-accent-mix-color: #8f690e;\ \n	--theme-alert-color: #bf0017;\ \n	--theme-alert-color--rgb: 191,0,23;\ \n	--theme-alert-label: #fff;\ \n	--theme-alert-color--hover: #59000b;\ \n	--theme-warning-color: #cf721c;\ \n	--theme-success-color: #0c742f;\ \n	--theme-success-color--rgb: 12,116,47;\ \n	--theme-success-label: #fff;\ \n	--theme-message-color: #753369;\ \n	--theme-table-background-color: #1e0c1b;\ \n	--theme-table-header-color: #291927;\ \n	--fandommobile-toc-close-icon-color: #d6d0d5;\ \n	--fandommobile-section-edit-icon-color: hsla(0,0%,90%,0.5);\ \n	--fandommobile-box-shadow: none;\ \n	--fandommobile-body-gradient: linear-gradient(180deg,#291927,#291927 55px,#1e0c1b 100vh,#1e0c1b);\ \n	--fandom-text-color: #f5f3f5;\ \n	--fandom-text-color--rgb: 245,243,245;\ \n	--fandom-text-color--hover: #c7bbc7;\ \n	--fandom-link-color: #ffc500;\ \n	--fandom-link-color--hover: #997600;\ \n	--fandom-link-color--rgb: 255,197,0;\ \n	--fandom-link-color--fadeout: rgba(255,197,0,0.3);\ \n	--fandom-accent-color: #ffc500;\ \n	--fandom-accent-color--hover: #997600;\ \n	--fandom-accent-label-color: #291927;\ \n	--fandom-border-color: #595358;\ \n	--fandom-secondary-button-color: $text-color;\ \n	--fandom-secondary-button-color--hover: #c7bbc7;\ \n	--fandom-dropdown-background-color: #291927;\ \n	--fandom-notifications-background-color: #1e0c1b;\ \n	--fandom-notifications-read-card-background-color: #1e0c1b;\ \n	--fandom-notifications-unread-card-background-color: #291927;\ \n	--fandom-notifications-footer-text-color: #d6d0d5;\ \n	--fandom-banner-notification-background-color: #1e0c1b;\ \n	--fandom-banner-notifications-close-icon: #f5f3f5;\ \n	--fandom-global-nav-background-color: #1e0c1b;\ \n	--fandom-global-nav-text-color: #fff;\ \n	--fandom-global-nav-link-color: #ffc500;\ \n	--fandom-global-nav-link-color--hover: #997600;\ \n	--fandom-global-nav-icon-color: #f5f3f5;\ \n	--fandom-global-nav-icon-background-color: rgba(89,83,88,0.5);\ \n	--fandom-global-nav-icon-background-color--hover: #595358;\ \n	--fandom-global-nav-icon-background-color--active: #595358;\ \n	--fandom-global-nav-icon-border-color: #f5f3f5;\ \n	--fandom-global-nav-icon-border-color--hover: hsla(0,0%,100%,0.5);\ \n	--fandom-global-nav-icon-border-color--active: #f5f3f5;\ \n	--fandom-global-nav-bottom-icon-color: #f5f3f5;\ \n	--fandom-global-nav-counter-background-color: #f5f3f5;\ \n	--fandom-global-nav-counter-label-color: #520044;\ \n	--fandom-global-nav-mobile-logo: url(https://dev.fandom.com/resources-ucp/dist/svg/wds-brand-fandom-logo-light.svg);\ \n	--fandom-global-nav-search-active-link-background-color: #595358;\ \n	--fandom-global-nav-search-active-link-border-color: #fff;\ \n	--fandom-global-nav-logo-separator-color: #d6d0d5;\ \n	--fandom-global-nav-search-separator-color: #595358;\ \n	--fandom-global-nav-bottom-shadow: none;\ \n	--fandom-global-nav-gp-legacy-logo: url(https://dev.fandom.com/resources-ucp/dist/svg/wds-brand-gamepedia-badge-orange.svg);\ \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: "FandomDesktop.css", href: "/fr/wiki/MediaWiki:Fandomdesktop.css" },           {                name: "Common.js", href: "/fr/wiki/MediaWiki:common.js" },           {            	name: "Wiki-navigation", href: "/fr/wiki/MediaWiki:Wiki-navigation" },           {            	name: "Dev", href: "https://dev.fandom.com/" },           {            	name: "CommunityConcil", href: "https://communitycouncil.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: "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" },           {            	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: "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; }); });

/* Script to help differentiate between FD and Oasis */ window.SkinPropagation = { skin: '', init: function { if (window.location.href.indexOf('useskin=') == -1) return; var url = SkinPropagation.parseURL(window.location.href); if (url.query.useskin) { SkinPropagation.skin = (url.query.propagateskin || url.query.useskin); }		if (SkinPropagation.skin != '') { $(document.body).bind('click.skinpropagation', SkinPropagation.clicEvent); $('form').bind('submit.skinpropagation', SkinPropagation.submitEvent); }	},	parseURL: function(url) { var ret = {base:,qs:,query:{},hash:''}; var loc = url.indexOf('#'); if (loc != -1) { ret.hash = url.substr(loc+1); url = url.substr(0,loc); }		loc = url.indexOf('?'); if (loc != -1) { ret.qs = url.substr(loc+1); url = url.substr(0,loc); var paras = ret.qs.split('&'); for (var i = 0; i < paras.length; i++) { var p = paras[i].split('='); if (p.length == 2) { ret.query[p[0]] = p[1]; }			}		}		ret.base = url; return ret; },	getURL: function(url) { var nurl = url.base + '?'; for (var p in url.query) { nurl += p + '=' + url.query[p] + '&'; }		nurl = nurl.substr(0,nurl.length-1); if (url.hash != '') { nurl += '#'+ url.hash; }		return nurl; },	clicEvent: function(e) { if (e.target.tagName.toLowerCase != 'a') return; if (e.target.href.indexOf(window.wgServer) != 0) return; var url = SkinPropagation.parseURL(e.target.href); var thisloc = SkinPropagation.parseURL(window.location.href); if (url.base == thisloc.base && url.qs == thisloc.qs && url.hash != '') { return; }		if (url.query.useskin && url.query.useskin != SkinPropagation.skin) { url.query.propagateskin = SkinPropagation.skin; } else { url.query.useskin = SkinPropagation.skin; }		e.target.href = SkinPropagation.getURL(url); },	submitEvent: function(e) { if (this.action.indexOf(window.wgServer) != 0) return; if (this.method == 'post') { var url = SkinPropagation.parseURL(this.action); url.query.useskin = SkinPropagation.skin; this.action = SkinPropagation.getURL(url); } else { $(this).append('<input type="hidden" name="useskin" value="'+SkinPropagation.skin+'"/>'); }	},	stop: function { $(document.body).unbind('click.skinpropagation'); $('form').unbind('submit.skinpropagation'); } }; $(SkinPropagation.init);

/*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' }); });