MediaWiki:Common.js: различия между версиями

Страница интерфейса MediaWiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
if (mw.config.get("wgPageName") === "Вооружение") {
document.addEventListener('DOMContentLoaded', function() {
    mw.loader.load("https://wiki.deadspace14.net/index.php?title=MediaWiki:Test/Revamp.js&action=raw&ctype=text/javascript");
    var searchButton = document.getElementById('citizen-search__buttonCheckbox');
}
    if (searchButton) {
        searchButton.addEventListener('click', function() {
            var searchInput = document.querySelector('#searchform input[name="search"]');
            if (searchInput) {
                searchInput.focus();
            }
        });
    }
});

Версия от 02:28, 18 апреля 2025

document.addEventListener('DOMContentLoaded', function() {
    var searchButton = document.getElementById('citizen-search__buttonCheckbox');
    if (searchButton) {
        searchButton.addEventListener('click', function() {
            var searchInput = document.querySelector('#searchform input[name="search"]');
            if (searchInput) {
                searchInput.focus();
            }
        });
    }
});