利用者:Funa-enpitu/MediaWiki:Gadget-WSexportK.js
注意: 保存後、変更を確認するにはブラウザーのキャッシュを消去する必要がある場合があります。
- Firefox / Safari: Shift を押しながら 再読み込み をクリックするか、Ctrl-F5 または Ctrl-R を押してください (Mac では ⌘-R)
- Google Chrome: Ctrl-Shift-R を押してください (Mac では ⌘-Shift-R)
- Internet Explorer / Microsoft Edge: Ctrl を押しながら 最新の情報に更新 をクリックするか、Ctrl-F5 を押してください
- Opera: Ctrl-F5を押してください
/**
* Adds a "Download as MOBI" link to the sidebar
*
* Generates and starts a download of the current page as an MOBI 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: 'ja',
format: 'mobi',
page: mw.config.get( 'wgPageName' )
} ),
'Kindle用に変換',
'n-epubExport',
'MOBI形式でこのページをダウンロード',
'',
'#t-print'
);
} );
}