MediaWiki:Common.js
Appearance
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */ $(document).ready(function () { $('#ca-viewsource').hide(); }); $(document).ready(function() { if (mw.config.get("wgAction") === "edit" || mw.config.get("wgAction") === "submit") { var userGroups = mw.config.get('wgUserGroups'); // Only tag regular 'user' edits, not sysop or approver if (userGroups.includes('user') && !userGroups.includes('approver') && !userGroups.includes('sysop')) { var $wpTextbox1 = $('#wpTextbox1'); if ($wpTextbox1.length && !$wpTextbox1.val().includes("{{NeedsReview}}")) { $wpTextbox1.val("{{NeedsReview}}\n" + $wpTextbox1.val()); } } } }); $(document).ready(function () { if (mw.config.get('skin') === 'vector-2022') { // Only add if not already added if (!$('#real-tagline').length) { const siteName = mw.config.get('wgSiteName') || 'Wikipedia'; $('.vector-header-start #p-logo').append(` <div id="site-name-custom">${siteName}</div> <div id="real-tagline">The Free Encyclopedia</div> `); } } });