User:Inductiveload/epubExport.js

/* * Simple script to add links to tpt's ws-export tool in the sidebar */ function add_tpt_export_button(format, display_format) { var epub_generation_link = 'http://toolserver.org/~tpt/wsexport/book.php?lang=en&page='+ mw.config.get('wgPageName') +'&format='+ format; mw.util.addPortletLink('p-coll-print_export', epub_generation_link, 'Download as ePub', 'coll-epub', 'Download this work as file in the ePub ebook format'); }

jQuery( document ).ready( function {	add_tpt_export_button('epub', 'ePub');	//add_tpt_export_button('xhtml', 'XHTML'); });