Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
} else { | } else { | ||
placeholder = $( '<div id="editpage-specialchars"> </div>' ).prependTo( '.mw-editTools' )[0]; | placeholder = $( '<div id="editpage-specialchars"> </div>' ).prependTo( '.mw-editTools' )[0]; | ||
+ | console.log(placeholder); | ||
} | } | ||
if ( !placeholder ) { | if ( !placeholder ) { |
Revision as of 12:15, 6 July 2022
/* Any JavaScript here will be loaded for all users on every page load. */ // Extension:Edittools // We put the edit tools section above the summary box. jQuery( document ).ready( function ( $ ) { 'use strict'; var placeholder; if ( $( '#editpage-specialchars' ).length ) { placeholder = $( '#editpage-specialchars' )[0]; } else { placeholder = $( '<div id="editpage-specialchars"> </div>' ).prependTo( '.mw-editTools' )[0]; console.log(placeholder); } if ( !placeholder ) { return; } $( '.editOptions' ).before( placeholder ); });