MediaWiki:Email link.js

// created by pl:user:Beau. Copied from odder's js as it got deleted there. I think somebody still uses this //add mw.loader.load( '/w/index.php?title=' + "MediaWiki:Email_link.js" + '&action=raw&ctype=text/javascript' ); to your special:mypage/monobook.js

$(function {	if (mw.config.get('wgNamespaceNumber') !== 0)		return;	if (mw.config.get('wgAction') != "view")		return;

var subject = 'Read a great article "' + mw.config.get('wgTitle') + '" on the English Wikinews!'; var body = "Hi!\n\nThere's a great article on the English Wikinews I think you will consider interesting. See " + document.location + " for more."; var link = document.createElement('a'); link.appendChild(document.createTextNode('E-mail this page')); link.href = "mailto:?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(body);

var li = document.createElement('li'); li.appendChild(link);

var tools = document.getElementById("t-permalink").parentNode; tools.appendChild(li); });