MediaWiki:Common.js: Porovnání verzí
Z TEST Wiki
Bez shrnutí editace značka: revertováno |
Bez shrnutí editace značka: revertováno |
||
| Řádek 9: | Řádek 9: | ||
var currentAction = searchForm.attr("action"); | var currentAction = searchForm.attr("action"); | ||
// | // Upravíme URL akce, aby vyhledávání vždy používalo "profile=all" | ||
var newAction = mw.util.wikiGetlink("Special:Search") + "?profile= | var newAction = mw.util.wikiGetlink("Special:Search") + "?profile=all&fulltext=1"; | ||
searchForm.attr("action", newAction); | searchForm.attr("action", newAction); | ||
} | } | ||
} | } | ||
}); | }); | ||
Verze z 5. 2. 2025, 13:27
/* 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");
// Upravíme URL akce, aby vyhledávání vždy používalo "profile=all"
var newAction = mw.util.wikiGetlink("Special:Search") + "?profile=all&fulltext=1";
searchForm.attr("action", newAction);
}
}
});