MediaWiki:Minerva.js: Difference between revisions
(Created page with "→All JavaScript here will be loaded for users of the MinervaNeue skin: // This code assumes you are using ResourceLoader and jQuery in MediaWiki mw.loader.using('jquery', function() { // Wait for the DOM to be ready $(document).ready(function() { // Select the edit button by its href attribute containing 'action=edit' $('a[href*="action=edit"]').each(function() { // Remove the 'section=0' part from the href $(this).attr('href', function(i, hre...") |
(No difference)
|
Latest revision as of 14:26, 31 October 2023
/* All JavaScript here will be loaded for users of the MinervaNeue skin */
// This code assumes you are using ResourceLoader and jQuery in MediaWiki
mw.loader.using('jquery', function() {
// Wait for the DOM to be ready
$(document).ready(function() {
// Select the edit button by its href attribute containing 'action=edit'
$('a[href*="action=edit"]').each(function() {
// Remove the 'section=0' part from the href
$(this).attr('href', function(i, href) {
return href.replace(/§ion=0/, '');
});
});
});
});