User:Spydar007/global.js

window.AdvancedOasisUI = { accountNavFollowedPages: true, accountNavWatchlist: true, categoryRedlink: true, RCHeader: true, lightbox: true, activity2RC: true, }; ajaxPages = [ "Special:Contributions", "Special:Log", "Special:RecentChanges", "Special:Watchlist", "Special:WikiActivity" ]; importArticles({   type: 'script',    articles: [        'u:dev:AdvancedOasisUI/code.js',        'u:dev:MessageBlocker/code.js',        'u:dev:MarkForDeletion/code.js',        'u:dev:RevealAnonIP/code.js',        'u:dev:PurgeButton/code.js',        'u:dev:AjaxRC/code.js',        'u:dev:AjaxBatchDelete/code.js',        'u:dev:AjaxPatrol/code.js',        'u:dev:AjaxUndo/code.js',        'u:dev:HideRail/code.js',        'u:dev:FloatingToc/code.js',        'u:c:User:Cap123/ChatHacks2.js',        'u:c:User:Monchoman45/ChatHacks.js',        'u:c:User:Cap123/ChatHacks.js',        'u:c:User:Joeytje50/ChatPMs.js',        'u:cod:User:Madnessfan34537/multikick.js',        'u:dev:WHAM/code.js',        'u:dev:SpoilerAlert/code.js',        'u:dev:WallGreetingButton/code.js',        'u:dev:QuickTools/code.js',        'u:dev:Sine/code.js',        'u:clubpenguin:User:Super Miron/chat-mod-calendar.js', ] });

importScriptPage('MediaWiki:Common.js', 'spydar007-test')

/* Testing Edit Summaries */

// ==================== // Source Editor // ====================

$(function {       if (skin == 'oasis'){            var $label = $('#edit_enhancements_toolbar #wpSummaryLabel');	    if (!$label.size) {	    	    return;	    }        }

if (skin == 'monobook'){ var $label = $('.editOptions #wpSummaryLabel'); if (!$label.size) { return; }       }

$combo = $(' ').attr('id', 'stdSummaries').change(function {		var val = $(this).val;		if (val != '') {			$('#wpSummaryEnhanced,#wpSummary').val(val);		}	}); $label.prepend(' ').prepend($combo).prepend('Summaries: ');

$.ajax({		'dataType': 'text',		'data': {			'title': 'w:User:Spydar007/summaries',			'action': 'raw',			'ctype': 'text/plain'		},		'url': wgScript,		'success': function(data) {			var lines = data.split("\n");			for (var i in lines) {				var val = (lines[i].indexOf('-- ') == 0) ? lines[i].substring(3) : '';				var text = (lines[i].indexOf('-- ') == 0) ? ' ' + lines[i].substring(3) : lines[i];				var disable = (lines[i].indexOf('-- ') == 0 || lines[i].indexOf('(') == 0) ? '' : 'disabled'; var $opt = '' + text + ' '; $combo.append($opt); }		}	}); })

// ==================== // Visual Editor // ==================== $(function {	var $label = $('.module_content #wpSummaryLabel');	if (!$label.size) {		return;	}	$combo = $(' ').attr('id', 'stdSummaries').change(function { var val = $(this).val; if (val != '') { $('#wpSummaryEnhanced,#wpSummary').val(val); }	});	$label.after($combo);

$.ajax({		'dataType': 'text',		'data': {			'title': 'w:User:Spydar007/summaries',			'action': 'raw',			'ctype': 'text/plain'		},		'url': wgScript,		'success': function(data) {			var lines = data.split("\n");			for (var i in lines) {				var val = (lines[i].indexOf('-- ') == 0) ? lines[i].substring(3) : '';				var text = (lines[i].indexOf('-- ') == 0) ? ' ' + lines[i].substring(3) : lines[i];				var disable = (lines[i].indexOf('-- ') == 0 || lines[i].indexOf('(') == 0) ? '' : 'disabled'; var $opt = '' + text + ' '; $combo.append($opt); }		}	});	$('.module_content #wpSummary').css({"margin-bottom": '8px'});	$('.module_content #stdSummaries').css({"width": '258px'});	$('.module_content #stdSummaries').css({"margin-bottom": '5px'}); });

/* END Edit Summaries */