MediaWiki:Common.js: Difference between revisions
28.10.2025 Prusac | 18.11.2025
No edit summary |
No edit summary |
||
| Line 10: | Line 10: | ||
console.log(document.getElementsByClassName('cdx-text-input__input')); | console.log(document.getElementsByClassName('cdx-text-input__input')); | ||
if (e.target.hash === '#naslov_nc') { | if (e.target.hash === '#naslov_nc') { | ||
document.getElementById('searchInput').focus(); | |||
document.getElementsByClassName('mw-inputbox-createbox')[0].focus(); | //document.getElementsByClassName('mw-inputbox-createbox')[0].focus(); | ||
} | } | ||
}); | }); | ||
Revision as of 08:41, 4 November 2025
/* Any JavaScript here will be loaded for all users on every page load. */
document.getElementById('searchInput').focus();
document.getElementById('searchInput').setAttribute("placeholder","");
/*document.getElementsByClassName('cdx-text-input__input')[0].setAttribute("autocomplete","off");*/
/*.innerHTML*/
document.getElementById("tstklk1").addEventListener("click", function(e) {
console.log(document.getElementsByClassName('mw-inputbox-createbox'));
console.log(document.getElementsByClassName('cdx-text-input__input'));
if (e.target.hash === '#naslov_nc') {
document.getElementById('searchInput').focus();
//document.getElementsByClassName('mw-inputbox-createbox')[0].focus();
}
});