User:Mdy66/vector.js

mw.loader.using('mediawiki.storage').then(function {  mw.storage.session.set( 'client-error-opt-out', '1' ); }); importScript('User:Ohconfucius/script/MOSNUM dates.js'); //User:Ohconfucius/script/MOSNUM dates.js

importScript('User:Ohconfucius/script/Common Terms.js'); //User:Ohconfucius/script/Common Terms.js

importScript('User:Alex Smotrov/histcomb.js')

// This script creates new text box for the name of the edited section. // This way, the browser's autocomplete for edit summary doesn't contain section name and becomes much more useful. // Tested in Firefox. addOnloadHook(function {	if (mw.config.get('wgAction') == 'edit' || mw.config.get('wgAction') == 'submit')	{		var summary = document.getElementById('wpSummary');		var sectionIdInput = where(summary.form.elements, function(el) { return el.name == 'wpSection' });		if (sectionIdInput)		{			if (sectionIdInput.value == 'new')				return;		}		summary.style.width = '74%';		var section = document.createElement('input');		section.id = section.name = 'section';		section.style.width = '23.7%';		section.style.setProperty('margin-right', '1%', );		section.tabIndex = 1;		summary.parentNode.insertBefore(document.createElement('br'), summary);		summary.parentNode.insertBefore(section, summary);		var re = RegExp('/\\*\\s*(.*?)\\s*\\*/\\s*');		var result = re.exec(summary.value);		if (result)			section.value = result[1];		summary.value = summary.value.replace(re, );		summary.form.onsubmit = function{ if (section.value) summary.value = '/* ' + section.value + ' */ ' + summary.value; };	} }); function where(array, predicate) {	for (var i = 0; i < array.length; i++)		if (predicate(array[i]))			return array[i]; }

importScript('User:TheDJ/foldrefs.js');

/*	HIGHLIGHT NEARBY LINKS Description: If two links are next to each other so it's hard to tell if they are one link or two separate ones (such as New York City), both links will be underlined so that it is clear that they are separate. Link: User:Gary King/highlight nearby links.js if (typeof(unsafeWindow) != 'undefined') {	var mw = unsafeWindow.mw; } $(highlightNearbyLinks); function highlightNearbyLinks {	if (!(mw.config.get('wgAction') == 'view' || (mw.config.get('wgPageName') == 'Wikipedia:Sandbox' && mw.config.get('wgAction') == 'submit'))) return false; mw.util.addCSS('a.highlight-nearby { text-decoration: underline; }'); mw.util.addCSS('a.highlight-nearby:hover { text-decoration: none; }'); var bodyId = mw.config.get('wgPageName') == 'Wikipedia:Sandbox' && mw.config.get('wgAction') == 'submit' ? 'wikiPreview' : 'bodyContent'; var body = $('#' + bodyId); if (!body.length) return false; var links = $('a', body); // loop through links in page body links.each(function	{		var link = $(this);		var next = link.next;		// NOT: next node is a link, preceded by spaces		// NOT: next node is a link and is also the next sibling		if (!(next.length && next[0].nodeName == 'A' && ((link[0].nextSibling.nodeType == 3 && link[0].nextSibling.nodeValue.replace(/ /g, ) == ) || link[0].nextSibling == next[0]))) return true;		// NOT: current and next links are not images		if (!(!link.hasClass('image') && !next.hasClass('image'))) return true;		// this is a refname		if ((link.children.length && link.children.first[0].nodeName == 'SUP') || (next.children.length && next.children.first[0].nodeName == 'SUP')) return true;		link.addClass('highlight-nearby');		next.addClass('highlight-nearby');	}); } importScript('User:Anomie/linkclassifier.js'); // Linkback: User:Anomie/linkclassifier.js importStylesheet('User:Anomie/linkclassifier.css'); // Linkback: User:Anomie/linkclassifier.css