User:Danski454/WhoisSidebar.js

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
if ((mw.config.get( 'wgNamespaceNumber' ) === 3 || mw.config.get( 'wgPageName' ).startsWith("Special:Contributions")) && (/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/.test(mw.config.get( 'wgRelevantUserName' )) || /^(?:[0-9a-f]{0,4}:)+[0-9a-f]{0,4}$/i.test(mw.config.get( 'wgRelevantUserName' )))) {  // Only for IP talk and contirbution pages

	// Create link
	$('#p-tb .body ul').append('<li><a class="WHOIS1"></a></li>');

	// Set link's text and url
	$('.WHOIS1').text('Whois').attr('href', 'http://whois.domaintools.com/' + mw.config.get( 'wgRelevantUserName' ) );
}
Retrieved from "https://en.wikipedia.org/w/index.php?title=User:Danski454/WhoisSidebar.js&oldid=850747763"