MediaWiki:Common.js: Difference between revisions

28.10.2025 Prusac | 18.11.2025

No edit summary
No edit summary
Line 5: Line 5:
/*document.getElementsByClassName('cdx-text-input__input')[0].setAttribute("autocomplete","off");*/
/*document.getElementsByClassName('cdx-text-input__input')[0].setAttribute("autocomplete","off");*/
/*document.getElementsByClassName('mw-inputbox-createbox')[0].setAttribute("autocomplete","off");*/
/*document.getElementsByClassName('mw-inputbox-createbox')[0].setAttribute("autocomplete","off");*/
/*klik iz abstracta za focus inputa 'novi clanak'*/
document.getElementById("precica").addEventListener("click", function(e) {
document.getElementsByClassName('mw-inputbox-createbox')[0].focus();
});


if (document.title === 'Kreiranje novog članka - MelanyWiki') {
if (document.title === 'Kreiranje novog članka - MelanyWiki') {
document.getElementsByClassName('mw-inputbox-createbox')[0].setAttribute("autocomplete","off");
document.getElementsByClassName('mw-inputbox-createbox')[0].setAttribute("autocomplete","off");
/*klik iz abstracta za focus inputa 'novi clanak'*/
document.getElementById("precica").addEventListener("click", function(e) {
document.getElementsByClassName('mw-inputbox-createbox')[0].focus();
});
}
}

Revision as of 09:34, 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");*/
/*document.getElementsByClassName('mw-inputbox-createbox')[0].setAttribute("autocomplete","off");*/

if (document.title === 'Kreiranje novog članka - MelanyWiki') {
	document.getElementsByClassName('mw-inputbox-createbox')[0].setAttribute("autocomplete","off");
	/*klik iz abstracta za focus inputa 'novi clanak'*/
	document.getElementById("precica").addEventListener("click", function(e) {
		document.getElementsByClassName('mw-inputbox-createbox')[0].focus();
	});
}