MediaWiki:Gadget-WSexport.js

Uit Wikisource

Let op! Nadat u de veranderingen heeft opgeslagen, moet u de cache van uw browser nog legen om ze daadwerkelijk te zien.

Mozilla (incl. Firefox) Ctrl+Shift+R
Internet Explorer Ctrl+F5
Opera F5
Safari Cmd+R
Konqueror F5
/**
 * Adds a "Download as EPUB" link to the sidebar
 *
 * Generates and starts a download of the current page as an EPUB file.
 * Subpages of the current page (if any) are included as well.
 *
 * Uses the WSExport tool on Wikimedia Labs:
 * http://wsexport.wmflabs.org/tool/book.php
 *
 * See Oldwikisource:Wikisource:WSexport for more information
 * Bug reports should go to fr:Wikisource:Wsexport
 * Tool source code at https://github.com/wsexport
 */
/*global mw, $ */
if ( $.inArray( mw.config.get( 'wgNamespaceNumber' ), [ 0 , 114 ] ) !== -1 ) {
	$( function () {
		mw.util.addPortletLink(
			'p-coll-print_export',
			'http://wsexport.wmflabs.org/tool/book.php?' + $.param( {
				lang: 'nl',
				format: 'epub',
				page: mw.config.get( 'wgPageName' )
			} ),
			'Downloaden als EPUB',
			'n-epubExport',
			'Download een EPUB versie van deze pagina',
			'',
			'#t-print'
		);
	} );
}