MediaWiki:Common.js: Difference between revisions

Created page with "→Any JavaScript here will be loaded for all users on every page load.: document.addEventListener( 'DOMContentLoaded', function () { document.querySelectorAll( 'a[href*="Special:ConfirmAccounts"]' ).forEach( function ( link ) { var match = link.textContent.trim().match( /^Account requests \((\d+)\)$/ ); if ( !match ) { return; } link.textContent = 'Account requests'; var badge = document.createElement( 'span' )..."
 
No edit summary
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
$( function () {
document.addEventListener( 'DOMContentLoaded', function () {
     document.querySelectorAll( 'a' ).forEach( function ( link ) {
     document.querySelectorAll( 'a[href*="Special:ConfirmAccounts"]' ).forEach( function ( link ) {
         var match = link.textContent.trim().match( /^Account requests \((\d+)\)$/ );
         var match = link.textContent.trim().match( /^Account requests \((\d+)\)$/ );
         if ( !match ) {
         if ( !match ) {