MediaWiki:Common.js: Porovnání verzí
Z TEST Wiki
Bez shrnutí editace značka: ruční vrácení zpět |
Bez shrnutí editace |
||
| Řádek 1: | Řádek 1: | ||
/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky */ | /* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky */ | ||
$(document).ready(function() { | |||
var searchForm = $("#searchform"); | |||
if (searchForm.length > 0) { | |||
var searchInput = searchForm.find("input[name='search']"); | |||
if (searchInput.length > 0) { | |||
var currentAction = searchForm.attr("action"); | |||
// Přepíšeme `profile=default` na `profile=all` | |||
var newAction = currentAction.replace("profile=default", "profile=all"); | |||
searchForm.attr("action", newAction); | |||
} | |||
} | |||
}); | |||
Verze z 5. 2. 2025, 13:43
/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky */
$(document).ready(function() {
var searchForm = $("#searchform");
if (searchForm.length > 0) {
var searchInput = searchForm.find("input[name='search']");
if (searchInput.length > 0) {
var currentAction = searchForm.attr("action");
// Přepíšeme `profile=default` na `profile=all`
var newAction = currentAction.replace("profile=default", "profile=all");
searchForm.attr("action", newAction);
}
}
});