มีเดียวิกิ:Gadget-MobileDownloadLink.js
หมายเหตุ: หลังเผยแพร่ คุณอาจต้องล้างแคชเว็บเบราว์เซอร์ของคุณเพื่อดูการเปลี่ยนแปลง
- ไฟร์ฟอกซ์ / ซาฟารี: กด Shift ค้างขณะคลิก Reload หรือกด Ctrl-F5 หรือ Ctrl-R (⌘-R บนแมค)
- กูเกิล โครม: กด Ctrl-Shift-R (⌘-Shift-R บนแมค)
- อินเทอร์เน็ตเอกซ์พลอเรอร์ และ Edge: กด Ctrl ค้างขณะคลิก Refresh หรือกด Ctrl-F5
- โอเปร่า: กด Ctrl-F5
/*
* Gadget: Download button for mobile users
*
* 2021-01-31: Import from [[MediaWiki:Mobile.js]]
*/
(function(mw, $) {
$(function() {
//link "download as ePub in the toolbar
if(["", "Translation"].indexOf(mw.config.get('wgCanonicalNamespace')) !== -1 ) {
$( '#page-actions' ).append(
$( '<li>' ).attr( {
id: 'page-actions-export-epub',
class: 'page-actions-menu__list-item',
} ).append(
$( '<a>' ).attr( {
id: 'ca-export-epub',
class: 'export-epub mw-ui-icon mw-ui-icon-element',
href: '//tools.wmflabs.org/wsexport/tool/book.php?lang=th&format=epub&page=' + mw.config.get( 'wgPageName' ),
title: 'ดาวน์โหลดรุ่น EPUB ของหน้านี้'
} ).append("Download EPUB")
)
);
}
});
} (mediaWiki, jQuery));