User:Dzylon/wikia.js

function getIb(that, title) { var wrap = document.getElementById('ajaxIbWrap'); console.log(that.href); that.title = ''; $.get(that.href, function(content) {		content = $(content).find('.infobox')[0];		if (content) {			if (wrap.title === 'abort') return;			$(wrap).html(content);		} else {			that.title = title;			wrap.style.display = 'none';		}	}); }

var content = document.getElementById('mw-content-text'), a = content.getElementsByTagName('a'), wrap = document.createElement('div');

wrap.id = 'ajaxIbWrap'; wrap.style = "position: fixed; display: none; min-width: 30px; min-height: 24px; background: url('data:image/gif;base64,R0lGODlhEgASAPYAAM7OztbW1uLi4vz8/Pb29vr6+paWlrCwsObm5ri4uOzs7PLy8iQkJNjY2GhoaMTExLS0tI6OjkBAQB4eHrKystra2k5OTkRERLy8vPDw8IiIiJKSkr6+vpiYmP7+/vT09OTk5MLCwoaGhqampoKCgpqamkpKSiAgIHZ2dszMzNTU1KioqMDAwK6urvj4+FpaWp6enmpqahwcHN7e3np6eqCgoHR0dJSUlO7u7oqKipycnICAgIyMjMjIyNDQ0GZmZujo6La2ttLS0qysrDAwMODg4G5ubnx8fEJCQj4+PhgYGMrKysbGxmJiYoSEhHBwcDY2Njg4OBAQEH5+fqqqqqKiopCQkGRkZF5eXurq6lhYWAwMDFZWVrq6utzc3BQUFDQ0NFJSUkhISKSkpCgoKCwsLGxsbBoaGjo6OkxMTHJyckZGRjIyMlxcXHh4eGBgYAYGBioqKgQEBAoKCiYmJhISElBQUFRUVAICAg4ODggICCIiIi4uLhYWFjw8PAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBQAAACwAAAAAEgASAAAHlIAAggAehQOHiB6Di4aNjouEhgJuD46Hg449WjuHIGoshpGOWlguC01snJYYRYVPWio5bGtAq0dHOgFjbT2zKZaFQU63rQUbQR8LyQWrVASGSVvSSczVhSohpoXR09YDKlRVVbUeFcXakuIQRUXZLCzkq8Up8O3ZwI0hoOXvjaKG/a4pCCUokwBgkPD5g/QvUaFFgQAAIfkEBQUAAAAsAgABAA4ADgAAB2iAAIKC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zGsxjKMSwQRipWVhWcmBsPhzlmKkvakJaDT2a3QVYHp4kzZiS4sOjhHJeR+pKKj4yBACH5BAUFAAQALAIAAQAOAA8AAAdwgASCBAOFg4eDAwFRK4iOLXNrA4mOAnN1H44EGymEfHMPj3x8byw0Uj2COIc5aKM+C4pZlR0ohyksuZ2CFBuZgri6BS1Nd3cqLgQ9AbfGNg9dNA0wMF6JJamb0j7Us4gFRzQLyjBdlTQ8kwXLtKGOgQAh+QQFBQADACwCAAIADAAOAAAHZ4ADggMNF0ODiIIUfXaCBImEfROCPo4llQNRfT1eg0N+fjEhOzIpiBkba6Aqg0CnMFMLkI4JJbKQEEZvbwGPPp2Eu1NLLCJeQ1QCHjhVKQUDNcYBVC04iRoilNSnIh2DACCJMD3L5YEAIfkEBQUAAgAsAQACAA0ADgAAB2SAAoKCFRYUg4iDCQwviYIekAgMZQSONSqCFwxLFYMeFGJiNkwaZACIkCVhoY6oYxqtiBxVH7FdNEZGFS4DAUWKuRo+PTdFXQkIkVQ+glQbRTMJXRmWz73SiUAbVY++2Ss+kOKBACH5BAUFAAYALAIAAgAOAA8AAAd2gAaCBjNaQYIDBQODgxhEV4KFEIyDRFEfCxdbDosGKwGCFkQpNlsMIIJBXFxTKVZQGKYhnQs1WKsNmFNDlKlWH4iMAI1Ugx7DwiI0NDMFhKiNyzdCADUgLCxAxhQqviAC2Au9A1XWx9jjNS2DFVnp3b2UHvEGgQAh+QQFBQALACwCAAIADgAOAAAHaIALggtFTRiDiIgsSUaChUGJhEkXBBkWSk+OLRULBS9JAEdKRAiCHE1NGgAGSCyjTIgrMaicLk4HkRkUHQSRhIIuSxS9pogDTBsaqr6EyjABKpu+CZwLHENARcymQ47MCkMJ24Mc1YmBADs=') no-repeat 14px 8px"; content.appendChild(wrap);

for (var i = 0; i < a.length; i++) { if (a[i].href === '#' || a[i].href === '#!') continue; a[i].addEventListener('mouseenter', function {		var wrap = document.getElementById('ajaxIbWrap');		wrap.style.display = 'block';		wrap.title = '';		getIb(this, this.title);	}); a[i].addEventListener('mouseleave', function {		var wrap = document.getElementById('ajaxIbWrap');		wrap.style.display = 'none';		wrap.innerHTML = '';		wrap.title = 'abort';	}); }

document.addEventListener('mousemove', function(e) {	var wrap = document.getElementById('ajaxIbWrap');	wrap.style.left = e.pageX + 5 + 'px';	wrap.style.top = e.pageY + 5 + 'px'; });