User:TechFilmer/global.js

// /* Creates edit buttons. By User:Thailog /* if (wgSiteName != "My Wiki Name") { rest of the code }

*/

/* not on Avatar Wiki */

if ( mw.config.get("skin") == "monobook") { if ($('#p-cactions').length && [2, 3, 1200].indexOf(mw.config.get('wgNamespaceNumber')) != -1) { $('#p-cactions li:nth-child(2)').after('User blog'); $('#p-cactions li:nth-child(3)').after('Contribs'); addPortletLink( 'p-navigation', '/wiki/Special:WikiActivity?useskin=wikia', 'Wiki Activity'); } }

if ( mw.config.get( "wgSiteName" ) != "Avatar Wiki" ) {

if ((wgAction == 'submit' || wgAction == 'edit') && mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images4.wikia.nocookie.net/avatar/images/4/4d/Support_Button.png", "speedTip": "Support", "tagOpen": " ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/avatar/images/9/9f/Oppose_Button.png", "speedTip": "Oppose", "tagOpen": " ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images4.wikia.nocookie.net/avatar/images/7/7e/Neutral_Button.png", "speedTip": "Neutral", "tagOpen": " ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/avatar/images/a/a5/Keep_Button.png", "speedTip": "Vote to keep", "tagOpen": " ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/avatar/images/3/3c/Delete_Button.png", "speedTip": "Vote to delete", "tagOpen": " ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/avatar/images/4/4d/Merge_Button.png", "speedTip": "Vote to merge", "tagOpen": " ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/avatar/images/b/b3/Done_Button.png", "speedTip": "Done", "tagOpen": "✅ ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/avatar/images/f/fd/Not_Done_Button.png", "speedTip": "Not done", "tagOpen": "❌ ", "tagClose": "", "sampleText": ""}; } /* everywhere */

if ((wgAction == 'submit' || wgAction == 'edit') && mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/sk001306/images/thumb/8/82/Gavel1.jpg/25px-Gavel1.jpg", "speedTip": "Close Discussion", "tagOpen": "", "sampleText": "result of discussion"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/OCR-A_char_Number_Sign.svg/20px-OCR-A_char_Number_Sign.svg.png", "speedTip": "Number Sign", "tagOpen": "# ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/c/c8/Button_redirect.png?1", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",		"tagClose": "", "sampleText": "Redirect link"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/8/8c/Button_RedX.png?1", "speedTip": "Delete", "tagOpen": "", "sampleText": "Delete"}; } } /* Chat hacks */ importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); importScriptPage('User:Joeytje50/ChatPMs.js', 'c'); /* Images */ importScriptPage("Callofduty4/OldFilePages.js", "c"); /* Anon IP */ importScriptPage('RevealAnonIP/usercode.js', 'dev'); /* User Page Create */ importArticles({   type: 'script',    articles: [        'w:dev:QuickCreateUserPage/code.js'    ] }); /* Wikimarks */ importArticles({   type: 'script',    articles: [        'u:wikimarks:Client.js'    ] });

/* Intro Button */ EditIntroButtonText = 'intro'; importScriptPage('EditIntroButton/code.js', 'dev');

/* Ajax Undo */ importScriptPage( 'AjaxUndo/code.js', 'dev' );

/* Purge Button */ PurgeButtonText = 'p'; importScriptPage('PurgeButton/code.js', 'dev');

/* UTC Time */ importArticle({type:'script', article:'w:c:dev:DisplayClock/code.js'});

// Switch Skin + WikiActivity $( function {	if ( !document.getElementById( 'ca-skins' ) ) {		if ( skin === 'oasis' || skin === 'wikia' ) {			$( 'MB' ).appendTo( '#GlobalNavigation' ); $( 'WM' ).appendTo( '#GlobalNavigation' ); $( '<a href="/index.php?title=Special:WikiActivity&useskin=wikia">WA</a></li>' ).appendTo( '#GlobalNavigation' ); 			} else {			$( '<a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikia">o</a></li>' ).appendTo( '#p-cactions > .pBody > ul' ); $( '<a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikiamobile">wm</a></li>' ).appendTo( '#p-cactions > .pBody > ul' );$( '<a href="/index.php?title=Special:WikiActivity&useskin=wikia">wa</a></li>' ).appendTo( '#p-cactions > .pBody > ul' ); } 	} } );

/* Ref popup */ importArticles({   type: 'script',    articles: [        'w:c:dev:ReferencePopups/code.js',    ] });

/* Sig Check Code */ importArticles({	type: 'script',	articles: [		'w:c:dev:SignatureCheck/code.js',	] });

// Admin Highlight

$.getJSON( mw.config.get('wgScriptPath')+'/index.php?action=raw&ctype=application/json&title=User:Amalthea_(bot)/userhighlighter.js/sysop.js', function(data){		$(function{ function highlightadmins_inner(n,h) //node, relevant hyperlink fragment {			 if (n.nodeType!=1||n.tagName.toLowerCase!="a") return 0; // not an anchor if (n.href.indexOf(wgScript+"?title="+h) == -1 &&			     n.href.indexOf(wgArticlePath.split("$1")[0]+h) == -1) return 0; // to the wrong target var u=n.href.split(h)[1]; if(data[u.split("_").join(" ")]==1) {			   n.style.backgroundColor="#00FFFF"; if(n.className==null||n.className=="") n.className="amalthea_userhighlighter_sysop"; else n.className+=" amalthea_userhighlighter_sysop"; }			 return 1; }			function highlightadmins(n) //node {			 while(n!=null) {			   if(highlightadmins_inner(n,"User:")) n=n.nextSibling; else if(highlightadmins_inner(n,"User_talk:")) n=n.nextSibling; else if(highlightadmins_inner(n,"Special:Contributions:")) n=n.nextSibling; else {			     if(n.firstChild!=null) highlightadmins(n.firstChild); n=n.nextSibling; }			 }			}			highlightadmins(document.getElementById('bodyContent')); });		}); }(jQuery)); //
 * (function($){