MediaWiki:Common.js: Porovnání verzí
Z TEST Wiki
Bez shrnutí editace |
Bez shrnutí editace |
||
| Řádek 14: | Řádek 14: | ||
}); | }); | ||
$(function () { | |||
mw.loader.using('ext.articleFeedbackv5').then(function () { | |||
setTimeout(function () { | |||
$('.articleFeedbackv5-submit').css({ | |||
'background-color': 'red', | |||
'color': 'white' | |||
}); | }); | ||
} | }, 1000); // můžeš upravit čas dle potřeby | ||
}); | }); | ||
}); | }); | ||
Verze z 9. 6. 2025, 11:21
/* 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);
}
}
});
$(function () {
mw.loader.using('ext.articleFeedbackv5').then(function () {
setTimeout(function () {
$('.articleFeedbackv5-submit').css({
'background-color': 'red',
'color': 'white'
});
}, 1000); // můžeš upravit čas dle potřeby
});
});