Utente:Wiso/monobook.js
Da Wikipedia, l'enciclopedia libera.
Per un aiuto sull'uso di questa pagina vedi Aiuto:Preferenze.
Nota: dopo aver salvato, devi pulire la cache del tuo browser per vedere i cambiamenti: Mozilla: clicca su reload (oppure ctrl-r), IE / Opera: ctrl-f5, Safari: cmd-r, Konqueror ctrl-r.
var toLoad = "purg led ns0 lks tabs chat nav stru unw allp tbar avan cwtch popup nms cmd qed wed since goo rch edt ver vfol"; //Monobook Modulare ver.4.2.6. //Lancia il vero monobook // Vedi [[Wikipedia:Monobook.js/MonobookCompleto.js]] // document.writeln('<script type="text/javascript" src="/w/index.php?title=Wikipedia:Monobook.js/MonobookCompleto.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //************SET STATUS*********** if (window.addEventListener) window.addEventListener("load",setLogonStatus,false); else if (window.attachEvent) window.attachEvent("onload",setLogonStatus); else { window.previousLoadFunction = window.onload; window.onload = function() { window.previousLoadFunction(); setLogonStatus(); } } // adds tab "set status" function setLogonStatus() { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; addlilink(tabs,'javascript:setCurrentStatus()','set status', 'pb-sstatus'); } function setCurrentStatus() { Greeter = " Hai chiesto di cambiare il tuo logon status\n. " + " Scegli il nuovo stato dalla lista "; var div = document.createElement('div'); div.id = 'inlinePopupDiv'; div.style.position = 'absolute'; div.style.zIndex = 1000; div.style.left = '5px'; div.style.top = '5px'; div.style.backgroundColor = '#FFFFFF'; div.style.borderStyle = 'solid'; div.style.borderWidth = ' medium'; div.style.borderColor = '#000000'; var top = document.createElement('div'); top.id = 'inlinePopupTop'; top.style.textAlign = 'right'; top.style.margin = '8px'; top.style.backgroundColor = '#DDDDDD'; var a = document.createElement('a'); a.appendChild( document.createTextNode('Close')); a.href = "javascript:void RemoveNode('inlinePopupDiv')"; a.style.margin = '8px'; top.appendChild(a); div.appendChild(top); var greet = document.createElement('p'); greet.innerHTML = Greeter; div.appendChild(greet); var form = document.createElement('form'); form.name = "popupForm"; var p = document.createElement('p'); p.appendChild(document.createTextNode('Stato:')); var sel = document.createElement('select'); sel.name = 'popupSelect'; sel.size = 1; var option; option = new Option("in",' '); option.value = "in"; sel.options[sel.options.length] = option; option = new Option("busy",' '); option.value = "busy"; sel.options[sel.options.length] = option; option = new Option("away",' '); option.value = "away"; sel.options[sel.options.length] = option; option = new Option("studying",' '); option.value = "studying"; sel.options[sel.options.length] = option; p.appendChild(sel); var button = document.createElement('input'); button.value = 'OK'; button.type = 'button'; button.setAttribute('onclick', 'saveNewStatus()'); p.appendChild(button); form.appendChild(p); div.appendChild(form); document.body.appendChild(div); div.getElementsByTagName('input')[0].focus(); } function saveNewStatus() { var newStatus = document.getElementById('inlinePopupDiv').getElementsByTagName('select')[0].value; var newString='{{Utente:Wiso/StatusTemplate|'+newStatus+'|User=Wiso}}\n'; location.href='http://it.wikipedia.org/w/index.php?title=Utente:Wiso/Status&action=edit'; alert("Quando la pagina e' stata caricata\npremi OK"); wpTextbox1=document.getElementById("wpTextbox1"); wpTextbox1.value=newString; summ=document.getElementById("wpSummary"); summ.value=summ.value+"stato modificato in \""+newStatus+"\""; document.getElementById("wpMinoredit").checked=1 wpSave=document.getElementById("wpSave"); wpSave.click(); }