221
edits
No edit summary |
No edit summary |
||
Line 730: | Line 730: | ||
$('#bodyContent').append(downloadButton); | $('#bodyContent').append(downloadButton); | ||
}); | }); | ||
$(document).ready(function() { | $(document).ready(function() { | ||
// Get the page title from the MediaWiki configuration | // Get the page title from the MediaWiki configuration | ||
var pageTitle = mw.config.get('wgTitle'); | var pageTitle = mw.config.get('wgTitle'); | ||
// | // Check if the page title contains a forward slash | ||
if (pageTitle.indexOf('/') === -1) { | if (pageTitle.indexOf('/') === -1) { | ||
// Show the download button if it's a top-level page | // Show the download button if it's a top-level page |