User:Kephir/gadgets/nectie.js

Hello, you have come here looking for the meaning of the word User:Kephir/gadgets/nectie.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Kephir/gadgets/nectie.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:Kephir/gadgets/nectie.js in singular and plural. Everything you need to know about the word User:Kephir/gadgets/nectie.js you have here. The definition of the word User:Kephir/gadgets/nectie.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Kephir/gadgets/nectie.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
/*jshint undef:true */
/*global mw, jQuery */
// NECtie: tie NEC to redlinks
mw.loader.using(, function () {

var rxPage = new RegExp('^' + mw.config.get('wgArticlePath').replace(/($^])/g, '\\$1').replace('\\$1', '(.*)') + '$'); // hax

function processLink(link) {
	if (!/^https?:/.test(link.href))
		return;
	var m, title, url = new mw.Uri(link.href);
	if (url.getAuthority() === location.hostname) {
		if ((url.path === mw.config.get('wgScript')) && (url.query.redlink === '1') && !('editintro' in url.query)) {
			title = new mw.Title(url.query.title);
			if (title.namespace === 0) {
				link.href = url.extend({ 'editintro': 'User:Yair_rand/usenec' });
			}
		}
		if (link.classList.contains("partlynew") && (m = rxPage.exec(url.path))) {
			title = new mw.Title(decodeURIComponent(m));
			if (title.namespace === 0) {
				var qs = url.getQueryString();
				qs = qs && ('&' + qs);
				link.href = mw.config.get('wgScript') + '?action=edit&section=new&editintro=User:Yair_rand/usenec&title=' + encodeURIComponent(title.getPrefixedDb()) + qs +
					(url.fragment ? '#' + url.fragment : '');
			}
		}
	}
}

var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; ++i) {
	processLink(links);
}

if ((mw.config.get('wgArticleId') === 0) && (mw.config.get('wgNamespaceNumber') === 0)) {
	var editlink = document.getElementById('ca-edit');
	editlink = editlink && editlink.getElementsByTagName('a');
	if (editlink)
		editlink.href += '&editintro=User:Yair_rand/usenec';
}

var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;

if (MutationObserver) {
	var mo = new MutationObserver(function (events) {
		for (var i = 0; i < events.length; ++i) {
			if (events.type === 'childList') {
				for (var j = 0; j < events.addedNodes.length; ++j) {
					if (events.addedNodes.tagName === 'A')
						processLink(events.addedNodes);
					if (!events.addedNodes.getElementsByTagName)
						continue;
					var links = events.addedNodes.getElementsByTagName('a');
					for (var k = 0; k < links.length; ++k) {
						processLink(links);
					}
				}
			}
			if ((events.type === 'attributes') && (events.target.tagName === 'A') && (events.attributeName === 'href')) {
				processLink(events.target);
			} else if ((events.type === 'attributes') && (events.target.tagName === 'A') && (events.attributeName === 'class')) {
				processLink(events.target);
			}
		}
	});

	mo.observe(document, {
		attributes: true,
		attributeFilter: ,
		childList: true,
		subtree: true
	});
}

if ((mw.config.get('wgNamespaceNumber') === 0) && (mw.config.get('wgArticleId') !== 0)) {
	mw.util.addPortletLink(
		'p-cactions', mw.util.getUrl(mw.config.get('wgPageName'), { 'action': 'edit', 'section': 'new', 'editintro': 'User:Yair rand/usenec' }),
		'+L2', 'newl2', 'Add new language heading using NEC', '+', document.getElementById('ca-history')
	);
}

});