Difference between revisions 399543 and 400609 on cswiktionarymw.loader.using('mediawiki.action.edit', function () { mw.toolbar.addButton( "http://upload.wikimedia.org/wikipedia/commons/5/55/Button_nbsp_1.png", "Tvrdá mezera", " ", "", "",'tlacitko','tlacitko'); mw.toolbar.addButton( (contracted; show full) "", "",'tlacitko','tlacitko'); }); loadScript("http://cs.wikipedia.org/w/index.php?title=Wikipedista:Mormegil/tools.js&action=raw&ctype=text/javascript&dontcountme=s"); addOnloadHook(function() { removeAccessKeys(null); }); ⏎ ⏎ ⏎ /* <pre> */ /* přidaná tlačítka na edit toolbar */ mw.loader.using('mediawiki.action.edit', function () { var button = { id: 'button-IPA', imageFile: '//upload.wikimedia.org/wikipedia/commons/7/77/Button_IPA.png', speedTip: 'IPA', tagOpen: '* {{IPA|', tagClose: '}}', sampleText: '' }; mw.toolbar.addButton( button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id ); }); mw.loader.using('mediawiki.action.edit', function () { var button = { id: 'button-trans', imageFile: '//upload.wikimedia.org/wikipedia/commons/6/63/Button_l_en.png', speedTip: 'překlady', tagOpen: '{{Překlady\n | významy = ', tagClose: ' \n | en = \n}}', sampleText: '' }; mw.toolbar.addButton( button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id ); }); if( mwCustomEditButtons ) { //IPA Šablona mwCustomEditButtons.push({ "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/77/Button_IPA.png", "speedTip": "IPA Šablona", "tagOpen": "* {{IPA|", "tagClose": "}}", "sampleText": "" }); //Šablona pro překlad mwCustomEditButtons.push({ "imageFile": "//upload.wikimedia.org/wikipedia/commons/6/63/Button_l_en.png", "speedTip": "anglicky", "tagOpen": "* {{en}}: {{P|en|", "tagClose": "}}", "sampleText": "" }); //Šablona pro překlad mwCustomEditButtons.push({ "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/7c/Nihongo_button.png", "speedTip": "japonsky", "tagOpen": "* {{ja}}: {{P|ja|", "tagClose": "}}", "sampleText": "" }); // Japonská substantiva mwCustomEditButtons.push({ "imageFile": "//upload.wikimedia.org/wikipedia/commons/1/1d/Bouton_Vandale1.png", "speedTip": "japonské substantivum", "tagOpen": "* {{subst:Uživatel:Reaperman/ja-substantivum|", "tagClose": "|rómadži|překlad}}", "sampleText": "hiragana" }); } function loadScript(url) { var e = document.createElement("script"); e.src = url; e.type="text/javascript"; document.getElementsByTagName("head")[0].appendChild(e); } //*** moveEditsection: Přesun odkazů [editovat] /* * moveEditsection * Tento skript přesouvá odkazy pro editování jednotlivých sekcí ([editovat]) hned za text nadpisu. * Skript vyžaduje povolený JavaScript. * * Skript je určen pro řešení problému s hromaděním odkazů [editovat] ve Firefoxu. V ostatních * prohlížečích (například Internet Explorer) nemusí zobrazovat správně. * * Tento skript je převzat z německé Wikipedie. * * Autorem skriptu je dbenzhuser (de:Benutzer:Dbenzhuser) */ addOnloadHook(function() { if (typeof oldEditsectionLinks != 'undefined' && oldEditsectionLinks) return; var spans = document.getElementsByTagName("span"); for (var i=0; i<spans.length; i++) { var span = spans[i]; if (span.className != "editsection") continue; span.style.fontSize = "x-small"; span.style.fontWeight = "normal"; span.style.cssFloat = "none"; span.style.marginLeft = "0px"; span.parentNode.appendChild(document.createTextNode(" ")); span.parentNode.appendChild(span); } }); /** * Připojí do sidebar menu za položku "Náhodné heslo" položku "Náhodné české heslo" * * @author Danny B. */ function appendRandomCzechWord() { var nodLiRandomCzechWord = document.createElement( 'li' ); var nodARandomCzechWord = document.createElement( 'a' ); var nodTextRandomCzechWord = document.createTextNode( 'Náhodné české heslo' ); var nodLiAfterNRandompage = document.getElementById( 'n-randompage' ).nextSibling; var nodUlPNavigation = nodLiAfterNRandompage.parentNode; nodLiRandomCzechWord.id = 'n-randomczechword'; nodARandomCzechWord.href = 'http://toolserver.org/~erwin85/randomarticle.php?lang=cs&family=wiktionary&categories=%C4%8Ce%C5%A1tina&subcats=1&d=2'; nodARandomCzechWord.appendChild( nodTextRandomCzechWord ); nodLiRandomCzechWord.appendChild( nodARandomCzechWord ); nodUlPNavigation .insertBefore( nodLiRandomCzechWord, nodLiAfterNRandompage ); } function customize() { appendRandomCzechWord(); } $( customize ); /* </pre> */ All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://cs.wiktionary.org/w/index.php?diff=prev&oldid=400609.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|