User:HM100/global.js

/* Quick Revert Spam and Vandalism */ mw.loader.using(['site', 'mediawiki.util']).then(function {	massBlockDelay = 440;	massProtectDelay =720;	massUserRightsDelay = 1000;	batchDeleteDelay = 768;	WHAMDelay = 480;	WHAMBotMe = true;

window.fdButtons = []; window.fdButtons.push(	   {	        summary: 'Housekeeping',	        label: 'HK'	    },	    {	        summary: 'Vandalism',	        label: 'V'	    },	    {	        summary: 'Spam',	        label: 'S'	    },	    {	        summary: 'Terms of Use violation',	        label: 'ToU'	    },	     {	        summary: 'Unused File/Video',	        label: 'UF'	    },	    {	            summary: 'Broken Redirect',	        label: 'BR'	    }	); // our config is stored in an array window.lessOpts = window.lessOpts || []; // each target page needs separate configuration window.lessOpts.push( {	   // this is the page that has the compiled CSS	    target: 'MediaWiki:Common.css',	    // this is the page that lists the LESS files to compile	    source: 'MediaWiki:Custom-common.less',	    // these are the pages that you want to be able to update the target page from	    // note, you should not have more than one update button per page	    load: [	        'MediaWiki:Common.css',	        'MediaWiki:Custom-common.less'	    ],	    // this is the page that contains the comment header for the target page	    // all other comments are stripped during compilation	    header: 'MediaWiki:Custom-css-header/common'	},	{	    // this is the page that has the compiled CSS	    target: 'MediaWiki:Wikia.css',	    // this is the page that lists the LESS files to compile	    source: 'MediaWiki:Custom-wikia.less',	    // these are the pages that you want to be able to update the target page from // note, you should not have more than one update button per page load: [ 'MediaWiki:Wikia.css', 'MediaWiki:Custom-wikia.less' ],	   // this is the page that contains the comment header for the target page // all other comments are stripped during compilation header: 'MediaWiki:Custom-css-header/wikia' },	{	   // this is the page that has the compiled CSS target: 'User:HM100/navbar-customization.css', // this is the page that lists the LESS files to compile source: 'User:HM100/navbar-customization.less', // these are the pages that you want to be able to update the target page from // note, you should not have more than one update button per page load: [ 'User:HM100/navbar-customization.css', 'User:HM100/navbar-customization.less' ],	   // this is the page that contains the comment header for the target page // all other comments are stripped during compilation header: 'User:HM100/navbar-customization' });	window.lessConfig = {	   // reloads the page after the target page has successfully been updated	    // defaults to true	    reload: true,	    // wraps the parsed CSS in pre tags to prevent any unwanted links to templates, pages or files	    // defaults to true	    wrap: true,	    // for adding non-standard user groups that can edit the mediawiki namespace	    // normally this is limited to staff, vstf, helpers and sysops/admins	    // but if there are other groups that can edit the namespace on your wiki	    // add them to the array here for the script to load for them	    allowed: ['user']	};

importArticles( {	   type: 'script',	    articles: [	        'u:dev:MediaWiki:FD-CSS-VTable.js',	        'u:dev:MediaWiki:Rollback/code.js',	        'u:dev:MediaWiki:MassBlock/code.js',	        'u:dev:MediaWiki:MassProtect/code.js',	        'u:dev:MediaWiki:MassRename/code.js',	        'u:dev:MediaWiki:MassUserRights/code.js',	        'u:dev:MediaWiki:WHAM/code.2.js',	        'u:dev:MediaWiki:UTCClock/code.js',// Removed because I'm using Κλωκάκι, a clone of UTCClock and DisplayTimer	        'u:dev:MediaWiki:Wikimarks/code.js',	        'u:dev:MediaWiki:FastDelete/code.js',	        "u:dev:MediaWiki:AjaxBatchDelete/code.2.js",	       // 'u:dev:MediaWiki:GlobalEditcount/code.js',	        'u:dev:MediaWiki:ViewInContentLang/code.js',	        //'u:dev:MediaWiki:LastEdited/code.js',	       // 'u:dev:MediaWiki:SeeMoreActivityButton/code.js',	        "u:dev:MediaWiki:AnchoredRollback/code.js",	        'u:dev:MediaWiki:RedirectManagement/code.js', 'u:dev:MediaWiki:Colors/code.js', 'u:dev:MediaWiki:ThemeToggler.js' //'u:dev:MediaWiki:ModernButtons/code.js', // 'u:dev:MediaWiki:Less/code.2.js', // 'u:dev:MediaWiki:MessageBlock/code.js', //'u:el.alpha-styles:Κλωκάκι/script.js', ]	} ); });

/* Theme Porting */ var config = mw.config.get([       'skin',    ]);

var $link = 'Get CPE Framework Theme'; $('.toolbar ul.tools').append($link); if (config.skin === 'fandomdesktop') { // FD       // Onclick $('ul.tools #ThemeDownload') .click(function {					result = '.theme-A[visualcolors="standard"] {\n' + // Beginning							 '--community-background-image:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-body-background-image") + ';\n' +							 '--community-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-body-background-color")  + ';\n' +							 '--community-background-mode:' + 'standard'  + ';\n' +							 '--community-background-alignment:' + 'top' + ';\n' +							 '--community-background-size:' + 'cover'  + ';\n' +							 '--community-background-no-tiling:' + 'false'  + ';\n' +							 '--anchor-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-link-color")  + ';\n' +							 '--page-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-page-background-color")  + ';\n' + '--page-border-background-color:' + 'auto' + ';\n' + '--page-text-background-color:' + 'auto' + ';\n' + '--accent-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-accent-color") + ';\n' + '--sticky-header-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-sticky-nav-background-color") + ';\n' + '--toolbar-background-color:' + 'auto' + ';\n' + '--custom-secondary-font:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-page-headings-font") + ';\n' + '}' // Ending navigator.clipboard.writeText(result); alert('Successfully copied CPE Framework theme to Clipboard') });			// Onclick end   } else if (config.skin === 'oasis')  { // Oasis        // Onclick		$('ul.tools #ThemeDownload')				.click(function { result = '.theme-A[visualcolors="standard"] {\n' + // Beginning '--community-background-image:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--oasis-community-background-image") + ';\n' + '--community-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-body-background-color") + ';\n' + '--community-background-mode:' + 'full' + ';\n' + '--community-background-alignment:' + 'top' + ';\n' + '--community-background-size:' + 'full' + ';\n' + '--community-background-no-tiling:' + 'false' + ';\n' + '--anchor-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-link-color") + ';\n' + '--page-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-page-background-color") + ';\n' + '--page-border-background-color:' + 'auto' + ';\n' + '--page-text-background-color:' + 'auto' + ';\n' + '--accent-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-accent-color") + ';\n' + '--sticky-header-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--theme-header-background-color") + ';\n' + '--toolbar-background-color:' + getComputedStyle(document.querySelector('html')).getPropertyValue("--oasis-wikiabar-background-color") + ';\n' + '--custom-secondary-font:' + '' + ';\n' + '}' // Ending navigator.clipboard.writeText(result); alert('Successfully copied CPE Framework theme to Clipboard') });			// Onclick end   }