મીડિયાવિકિ:Gadget-WSexport.js

વિકિસ્રોતમાંથી

નોંધ: પાનું પ્રકાશિત કર્યા પછી, તમારે તમારા બ્રાઉઝરની કૅશ બાયપાસ કરવાની આવશ્યકતા પડી શકે છે.

  • ફાયરફોક્સ / સફારી: શીફ્ટ દબાવેલી રાખીને રિલોડ પર ક્લિક કરો, અથવા તો Ctrl-F5 કે Ctrl-R દબાવો (મેક પર ⌘-R)
  • ગુગલ ક્રોમ: Ctrl-Shift-R દબાવો (મેક પર ⌘-Shift-R)
  • ઈન્ટરનેટ એક્સપ્લોરર/એજ: Ctrl દબાવેલી રાખીને રિફ્રેશ પર ક્લિક કરો, અથવા Ctrl-F5 દબાવો
  • Opera: Ctrl-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',
			'//tools.wmflabs.org/wsexport/tool/book.php?' + $.param( {
				lang: 'gu',
				format: 'epub-3',
				page: mw.config.get( 'wgPageName' ),
				fonts: 'mukta-vaani'
			} ),
			'Download as EPUB',
			'n-epubExport',
			'Download an EPUB version of this page',
			'',
			'#t-print'
		);
		mw.util.addPortletLink(
			'p-coll-print_export',
			'//tools.wmflabs.org/wsexport/tool/book.php?' + $.param( {
				lang: 'gu',
				format: 'mobi',
				page: mw.config.get( 'wgPageName' )
			} ),
			'Download as MOBI',
			'n-mobiExport',
			'Download a MOBI version of this page',
			'',
			'#t-print'
		);
		mw.util.addPortletLink(
			'p-coll-print_export',
			'//tools.wmflabs.org/wsexport/tool/book.php',
			'Choose format',
			'n-toolExport',
			'Download a version of a work in other formats',
			'',
			'#t-print'
		);
	} );
}