MediaWiki:Common.js
28.10.2025 Prusac | 18.11.2025
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* 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");
/*klik iz abstracta za focus inputa 'novi clanak'*/
document.getElementById("precica").addEventListener("click", function(e) {
document.getElementsByClassName('mw-inputbox-createbox')[0].focus();
});
console.log(document.title);
/* ukidamo autocomplete za novi clanak (input) */
document.addEventListener("DOMContentLoaded", (event) => {
console.log('usao sam');
if (document.title === 'Kreiranje novog članka - MelanyWiki') alert('to je ta strana');
});