MediaWiki:Common.js: Difference between revisions

From Objective Earth
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: →‎Table of contents: $(document).ready(function() { const mwPagesDiv = $('#mw-pages'); const firstDivInsideMwPages = mwPagesDiv.find('div:first'); const newElement = $('.toctitle'); newElement.css('display', ''); // Insert the new element before the first div inside #mw-pages newElement.insertBefore(firstDivInsideMwPages); });")
 
No edit summary
Tag: Manual revert
 
(2 intermediate revisions by the same user not shown)
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. */
/* Table of contents */
$(document).ready(function() {
    const mwPagesDiv = $('#mw-pages');
    const firstDivInsideMwPages = mwPagesDiv.find('div:first');
    const newElement = $('.toctitle');
newElement.css('display', '');
    // Insert the new element before the first div inside #mw-pages
    newElement.insertBefore(firstDivInsideMwPages);
});

Latest revision as of 06:33, 4 September 2023

/* Any JavaScript here will be loaded for all users on every page load. */