MediaWiki:Common.js: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
}); | }); | ||
} | } | ||
}); | |||
$(document).ready(function() { | |||
$('.event-banner').on('click', function() { | |||
window.location.href = $(this).data('href'); | |||
}); | |||
}); | }); | ||
Latest revision as of 21:58, 9 January 2026
mw.loader.using( [ 'mediawiki.util' ] ).done( function() {
if ( mw.config.get( 'wgPageName' ) === 'Main_Page' ) {
$(document).ready(function() {
var searchButton = document.getElementById( 'skin-citizen-search-trigger' );
if (searchButton) {
searchButton.addEventListener( 'click', function() {
// Click the search summary button to trigger the dropdown
var searchSummary = document.getElementById( 'citizen-search-summary' );
if (searchSummary) {
searchSummary.click();
}
});
}
});
}
});
$(document).ready(function() {
$('.event-banner').on('click', function() {
window.location.href = $(this).data('href');
});
});