MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
header/premiere thumbs |
logo stays in sidebar |
||
| Line 1: | Line 1: | ||
/* | /* Keep the logo in the sidebar. Park search at the left of the header (right of the logo). */ | ||
(function () { | (function () { | ||
function ready(fn) { | function ready(fn) { | ||
| Line 9: | Line 9: | ||
} | } | ||
ready(function () { | ready(function () { | ||
var | var search = document.getElementById('p-search'); | ||
var head = document.getElementById('mw-head'); | var head = document.getElementById('mw-head'); | ||
if (search && head && search.parentNode !== head) { | |||
head.insertBefore(search, head.firstChild); | |||
head.insertBefore( | |||
} | } | ||
}); | }); | ||
})(); | })(); | ||
Revision as of 00:34, 21 September 2026
/* Keep the logo in the sidebar. Park search at the left of the header (right of the logo). */
(function () {
function ready(fn) {
if (document.readyState !== 'loading') {
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
ready(function () {
var search = document.getElementById('p-search');
var head = document.getElementById('mw-head');
if (search && head && search.parentNode !== head) {
head.insertBefore(search, head.firstChild);
}
});
})();