Difference between revisions of "MediaWiki:Common.js"

From M59Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
jQuery( document ).ready( function ( $ ) {
 
jQuery( document ).ready( function ( $ ) {
 
   'use strict';
 
   'use strict';
   var placeholer;
+
   var placeholder;
 
  if ( $( '#editpage-specialchars' ).length ) {
 
  if ( $( '#editpage-specialchars' ).length ) {
 
   placeholder = $( '#editpage-specialchars' )[0];
 
   placeholder = $( '#editpage-specialchars' )[0];

Revision as of 12:14, 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];
  }
  if ( !placeholder ) {
    return;
  }
  $( '.editOptions' ).before( placeholder );
});