MediaWiki:Common.js: Difference between revisions
28.10.2025 Prusac | 18.11.2025
No edit summary |
No edit summary |
||
| Line 19: | Line 19: | ||
setTimeout(() => { | setTimeout(() => { | ||
document.getElementById(window.location.hash.substring(1)).scrollIntoView(); | document.getElementById(window.location.hash.substring(1)).scrollIntoView(); | ||
}, | }, 1000); | ||
} | } | ||
Revision as of 12:37, 6 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 na MelanyWiki - 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();
});
}
document.getElementById('footer').insertAdjacentHTML('afterbegin', '<span id="mslogod"><img src="/skins/msoft_w.svg" alt="MelanyWiki" lang="en" width="150" height="38" loading="lazy"></span>');
if (window.location.hash !== '') {
setTimeout(() => {
document.getElementById(window.location.hash.substring(1)).scrollIntoView();
}, 1000);
}