Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: window.charinsertDontMove = false;") |
|||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* 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 placeholer; | ||
+ | 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 ); | ||
+ | } |
Revision as of 12:09, 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 placeholer; 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 ); }