Uporabnik:Mihael Simonič/monobook.js
Iz Wikipedije, proste enciklopedije
Opomba: Da bodo spremembe prišle do veljave, po shranitvi izpraznite predpomnilnik svojega brskalnika: Mozilla/Safari: držite Shift in kliknite Reload (ali pritisnite Ctrl-Shift-R), Internet Explorer: Ctrl-F5, Opera/Konqueror: F5.
// Add a "Editcount" link to your monobook "personal menu" list at the very top of the page // Author: Mihael Simonič; Based on: Kate tool // // Indicate where you would like "Editcount" to appear: // pt-userpage, pt-mytalk, pt-preferences, // pt-watchlist, pt-mycontris, pt-logout // gsKateInsertBefore = 'pt-mytalk'; // leave blank to append after "logout" function KateLink() { var user = document.getElementById( 'pt-userpage').firstChild.firstChild.data; var li = document.createElement( 'li' ); li.id = 'pt-kate'; var a = document.createElement( 'a' ); a.appendChild( document.createTextNode( 'števec urejanj' ) ); // eh, the css makes the text lowercase a.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=Mihael+Simoni%C4%8D&dbname=slwiki_p' li.appendChild( a ); if ( ! gsKateInsertBefore ) // append to end (right) of list { document.getElementById( 'pt-logout' ).parentNode.appendChild( li ); } else { var before = document.getElementById( gsKateInsertBefore ); before.appendChild( li, before ); } } if ( window.addEventListener ) window.addEventListener( 'load', KateLink, false ); else if ( window.attachEvent ) window.attachEvent( 'onload', KateLink ); // Orodja. // [[Uporabnik:Eleassar/SearchBox.js]] document.write('<script type="text/javascript" src="' + 'http://sl.wikipedia.org/w/index.php?title=Uporabnik:Eleassar/SearchBox.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // [[:en:User:Lupin/popups.js]] document.write('<script type="text/javascript" src="' + 'http://sl.wikipedia.org/w/index.php?title=User:Mihael+Simonič/popupstrings-sl.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // Tipkovnične bližnjice. Avtor: Dbc334 function keyDown(event) { var key; if(window.event) {key = window.event.keyCode;} else if(event.which) {key = event.which;} else {return true;} // Neznan brskalnik if(key == 113) {insertTags("[[","]]","Naslov povezave");} // Tipka F2 else if(key == 118) {document.URL = "http://sl.wikipedia.org/w/index.php?title=Posebno:Log/delete&page=" + document.selection.createRange().text;} // Tipka F7 else if(key == 119) {document.URL = "http://commons.wikimedia.org/w/index.php?title=Special:Log&type=delete&page=" + document.selection.createRange().text;} // Tipka F8 else if(key == 120) {popraviPNG();} // Tipka F9 else if(key == 123) {document.URL = "http://commons.wikimedia.org/wiki/Image:" + document.selection.createRange().text;} // Tipka F12 else return true; return false; } document.onkeydown = keyDown; /*function mwInsertKeyboardShorcut() { var toolbar = document.getElementById('toolbar'); if(toolbar) { var polje = document.createElement("div"); polje.style.display = "none" polje.style.visibility = "hidden" polje.style.backgroundColor = "red" polje.style.borderColor = "#770000" polje.style.borderStyle = "solid" polje.style.borderWidth = "1px" polje.style.width = "70px" polje.style.padding = "2px 5px" polje.style.margin = "0px 0px 0px 5px" polje.style.textAlign = "center" polje.id = "KeyboardShorcutOuter" var polje2 = document.createElement("a"); polje2.innerHTML = "Izklopljeno" polje2.id = "KeyboardShorcut" polje2.href = "http://sl.wikipedia.org/wiki/Wikipedija:Bli%C5%BEnjice_pri_urejanju_strani" polje2.style.textDecoration = "none" polje2.style.color = "black" toolbar.appendChild(polje).appendChild(polje2); } return true; } hookEvent("load", mwInsertKeyboardShorcut); function keyDown2(event) { var toolbar = document.getElementById('toolbar'); if(!toolbar) {return true;} var key; if(window.event) {key = window.event.keyCode;} else if(event.which) {key = event.which;} else {return true;} // Neznan brskalnik var stanje = document.getElementById('KeyboardShorcutOuter'); var stanje2 = document.getElementById('KeyboardShorcut'); if(key == 113) { // Tipka F2 (SCROLL LOCK = 145) if(stanje2.innerHTML == "Izklopljeno") { stanje2.innerHTML = "Vklopljeno" stanje.style.display = "inline" stanje.style.visibility = "" stanje.style.backgroundColor = "lime" stanje.style.borderColor = "#007700" } else { stanje2.innerHTML = "Izklopljeno" stanje.style.backgroundColor = "red" stanje.style.borderColor = "#770000" } } else if((stanje2.innerHTML == "Vklopljeno")) { if(key == 48) {insertTags("--'''[[Uporabnik:Mihael Simonič|Miha]]''' 12:25, 3 december 2006 (CET)","",""); return false;} // Tipka 0 - podpis else if(document.selection.createRange().text != "") { if(key == 49) {insertTags("'''","'''","Krepko besedilo"); return false;} // Tipka 1 - krepkoko else if(key == 50) {insertTags("''","''","Ležeče besedilo"); return false;} // Tipka 2 - poševno else if(key == 51) {insertTags("[[","]]","Naslov povezave"); return false;} // Tipka 3 - np else if(key == 52) {insertTags("[","]","http://www.zgled.com naslov povezave"); return false;} // Tipka 4 - zp else if(key == 53) {insertTags("== "," ==","Besedilo naslovne vrstice"); return false;} // Tipka 5 - BNV else if(key == 54) {insertTags("[[Slika:","]]","Zgled.jpg"); return false;} // Tipka 6 - slika else if(key == 55) {insertTags("\n---\n","",""); return false;} // Tipka 7 - črta else if(key == 56) {insertTags("<s>","</s>","Prečrtano besedilo"); return false;} // Tipka 8 - prečrtaj else if(key == 57) {insertTags("#REDIRECT [[","]]","Vnesi ciljno stran"); return false;} // Tipka 9 - preusmeritev else return true; } else return true; } else return true; return true; } document.onkeydown = keyDown2;*/ //Logotip. Avtor: Dbc334 //function popraviLogotip() { // document.getElementById('p-logo').style.height = "235px" // document.getElementById('p-navigation').style.paddingTop = "80px" // document.getElementById('p-logo').innerHTML = '<a style="background-image: url(http://upload.wikimedia.org/wikipedia/sl/9/91/SLIKA.FORMAT); height: //235px;" href="/wiki/Glavna_stran" title="Glavna stran"></a>'; //} //addOnloadHook(popraviLogotip); /* </nowiki> </pre> */