221
edits
No edit summary |
No edit summary |
||
Line 704: | Line 704: | ||
$( | $(window).on('load', function() { | ||
// Test if the script is running | // Test if the script is running | ||
alert('Test'); | alert('Test'); | ||
Line 727: | Line 727: | ||
}); | }); | ||
// | // Wait until the content is fully loaded and then insert the button | ||
$('#mw-content-text').prepend(downloadButton); // | var contentArea = $('#mw-content-text'); | ||
if (contentArea.length) { | |||
contentArea.prepend(downloadButton); // You can use append() if you prefer it at the bottom | |||
} else { | |||
console.error('Content area not found.'); | |||
} | |||
}); | }); |