User:OttoLannister550/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MassEdit/code.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:FindAndReplace/code.js',        'u:dev:MediaWiki:AjaxRename/code.js',        'u:dev:MediaWiki:AjaxEdit.js',        'u:dev:MediaWiki:AjaxRedirect/code.js',        'u:dev:MediaWiki:MassNullEdit/code.js',        'u:dev:MediaWiki:AjaxDelete/code.js',        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:MediaWiki:AjaxBatchUndelete.js',        'u:dev:MediaWiki:AjaxEditPreview.js',        'u:dev:MediaWiki:WhatLinksHere/code.js',        'u:dev:MediaWiki:TopArticles/code.js',        'u:dev:MediaWiki:MassRename/code.js',        'u:dev:MediaWiki:DisplayTimer/code.js',        'u:dev:MediaWiki:NullEditButton/code.js',        'u:dev:MediaWiki:DisableCode/code.js',        'u:dev:MediaWiki:PageCreator/code2.js',        'u:dev:MediaWiki:ThemeToggler.js', 'u:dev:MediaWiki:DateInserter/code.js', 'u:dev:MediaWiki:QuickPurge.js', 'u:dev:MediaWiki:SkinSwitchFD.js', 'u:dev:MediaWiki:MultiUpload.js', 'u:dev:MediaWiki:ImageMapEdit.js', 'u:dev:MediaWiki:ImageMapEditZoom.js', 'u:dev:MediaWiki:MobilePreview.js', ] });

/* Adding Personal CSS, Personal JS, Wiki CSS, and Wiki JS to the Wiki Tools' Dropdown */ $(function {	var i; //Creating Personal CSS' Sub Menus	var personalCSS_submenu_a, personalCSS_submenu_li;	var personalCSSName = ['Common', 'Fandomdesktop', 'FandomMobile', 'Oasis'];	var personalCSSName_lc = ['common', 'fandomdesktop', 'fandommobile', 'oasis'];	var personalCSS_submenuContainer_ul = document.createElement('ul');    personalCSS_submenuContainer_ul.className = 'wds-list wds-is-linked';	    for (i = 0; i < personalCSSName.length; i++) {		    personalCSS_submenu_a = document.createElement('a');    	    personalCSS_submenu_a.href = '/wiki/Special:MyPage/' + personalCSSName_lc[i] + '.css';    	    personalCSS_submenu_a.id = 'Personal_' + personalCSSName[i] + '_CSS';    	    personalCSS_submenu_a.innerHTML = personalCSSName[i] + ' CSS';    	    personalCSS_submenu_li = document.createElement('li');         	personalCSS_submenu_li.appendChild(personalCSS_submenu_a);    	    personalCSS_submenuContainer_ul.appendChild(personalCSS_submenu_li); }   var personalCSS_submenuContainer_div = document.createElement('div'); personalCSS_submenuContainer_div.className = 'wds-is-not-scrollable wds-dropdown-level-2__content'; personalCSS_submenuContainer_div.appendChild(personalCSS_submenuContainer_ul); //Creating Personal JS' Sub Menus var personalJS_submenu_a, personalJS_submenu_li; var personalJSName = ['Common', 'Fandomdesktop', 'FandomMobile', 'Oasis']; var personalJSName_lc = ['common', 'fandomdesktop', 'fandommobile', 'oasis']; var personalJS_submenuContainer_ul = document.createElement('ul'); personalJS_submenuContainer_ul.className = 'wds-list wds-is-linked'; for (i = 0; i < personalJSName.length; i++) { personalJS_submenu_a = document.createElement('a'); personalJS_submenu_a.href = '/wiki/Special:MyPage/' + personalJSName_lc[i] + '.js'; personalJS_submenu_a.id = 'Personal_' + personalJSName[i] + '_JS'; personalJS_submenu_a.innerHTML = personalJSName[i] + ' JS'; personalJS_submenu_li = document.createElement('li'); personalJS_submenu_li.appendChild(personalJS_submenu_a); personalJS_submenuContainer_ul.appendChild(personalJS_submenu_li); }   var personalJS_submenuContainer_div = document.createElement('div'); personalJS_submenuContainer_div.className = 'wds-is-not-scrollable wds-dropdown-level-2__content'; personalJS_submenuContainer_div.appendChild(personalJS_submenuContainer_ul); //Creating Wiki CSS' Sub Menus var wikiCSS_submenu_a, wikiCSS_submenu_li; var wikiCSSName = ['Common', 'Fandomdesktop', 'Wikia', 'Print', 'Group-autoconfirmed', 'Group-sysop', 'Group-bot']; var wikiCSS_submenuContainer_ul = document.createElement('ul'); wikiCSS_submenuContainer_ul.className = 'wds-list wds-is-linked'; for (i = 0; i < wikiCSSName.length; i++) { wikiCSS_submenu_a = document.createElement('a'); wikiCSS_submenu_a.href = '/wiki/MediaWiki:' + wikiCSSName[i] + '.css'; wikiCSS_submenu_a.id = 'Wiki_' + wikiCSSName[i] + '_CSS'; wikiCSS_submenu_a.innerHTML = wikiCSSName[i] + ' CSS'; wikiCSS_submenu_li = document.createElement('li'); wikiCSS_submenu_li.appendChild(wikiCSS_submenu_a); wikiCSS_submenuContainer_ul.appendChild(wikiCSS_submenu_li); }   var wikiCSS_submenuContainer_div = document.createElement('div'); wikiCSS_submenuContainer_div.className = 'wds-is-not-scrollable wds-dropdown-level-2__content'; wikiCSS_submenuContainer_div.appendChild(wikiCSS_submenuContainer_ul); //Creating Wiki JS' Sub Menus var wikiJS_submenu_a, wikiJS_submenu_li; var wikiJSName = ['Common', 'Fandomdesktop', 'Wikia', 'Group-autoconfirmed', 'Group-sysop', 'Group-bot']; var wikiJS_submenuContainer_ul = document.createElement('ul'); wikiJS_submenuContainer_ul.className = 'wds-list wds-is-linked'; for (i = 0; i < wikiJSName.length; i++) { wikiJS_submenu_a = document.createElement('a'); wikiJS_submenu_a.href = '/wiki/MediaWiki:' + wikiJSName[i] + '.js'; wikiJS_submenu_a.id = 'Wiki_' + wikiJSName[i] + '_JS'; wikiJS_submenu_a.innerHTML = wikiJSName[i] + ' JS'; wikiJS_submenu_li = document.createElement('li'); wikiJS_submenu_li.appendChild(wikiJS_submenu_a); wikiJS_submenuContainer_ul.appendChild(wikiJS_submenu_li); }   var wikiJS_submenuContainer_div = document.createElement('div'); wikiJS_submenuContainer_div.className = 'wds-is-not-scrollable wds-dropdown-level-2__content'; wikiJS_submenuContainer_div.appendChild(wikiJS_submenuContainer_ul); //Creating the Menus var menu_a, menu_li; var menuName = ['Personal CSS', 'Personal JS', 'Wiki CSS', 'Wiki JS']; var menuName_hyphen = ['Personal_CSS', 'Personal_JS', 'Wiki_CSS', 'Wiki_JS']; var menuContent = [personalCSS_submenuContainer_div, personalJS_submenuContainer_div, wikiCSS_submenuContainer_div, wikiJS_submenuContainer_div]; var wikiToolsDropdown = document.querySelectorAll('.wiki-tools .wds-dropdown__content>ul.wds-list'); for (i = 0; i < menuName.length; i++) { menu_a = document.createElement('a'); menu_a.href = '#'; menu_a.id = menuName_hyphen[i]; menu_a.innerHTML = menuName[i]; menu_li = document.createElement('li'); menu_li.className = 'wds-dropdown-level-2 is-calculated css-js_pages_li'; menu_li.appendChild(menu_a); menu_li.appendChild(menuContent[i]); wikiToolsDropdown[0].appendChild(menu_li); wikiToolsDropdown[1].appendChild(menu_li); } //Styling the Menus var cssjsPageMenus_li = document.getElementsByClassName('css-js_pages_li'); var cssjsPageMenus_a = document.querySelectorAll('.wds-dropdown__content .css-js_pages_li>a'); var cssjsPageSubMenus_div = document.querySelectorAll('.css-js_pages_li>div.wds-dropdown-level-2__content'); for (i = 0; i < cssjsPageMenus_li.length; i++) { cssjsPageMenus_li[i].style.marginRight = '9px'; cssjsPageMenus_li[i].style.marginLeft = '0'; cssjsPageMenus_a[i].style.paddingLeft = '19px'; cssjsPageSubMenus_div[i].style.left = 'inherit'; cssjsPageSubMenus_div[i].style.right = '100%'; } });