Wikipedista:Blanche de Besantsaunt/monobook.js

Poznámka: Po uložení musíte vyprázdnit mezipaměť vašeho prohlížeče, jinak změny neuvidíte.

function loadScript(url)
{
   var e = document.createElement("script");
   e.src = url;
   e.type="text/javascript";
   document.getElementsByTagName("head")[0].appendChild(e);
}
 
loadScript("http://cs.wikipedia.org/w/index.php?title=Wikipedista:Mormegil/tools.js&action=raw&ctype=text/javascript&dontcountme=s");
$(function() { addFindAndReplaceToolbar() });
 
//addOnloadHook(function() { addFindAndReplaceToolbar() });
 
loadScript("http://localhost/wikipedia.js");
 
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>');
popupRevertSummary='Revertování na revizi %s s použitím utility [[:en:Wikipedia:Tools/Navigation_popups|popups]]';
 
// --------- vlastní tlačítka do editační lišty ---------
if (mwCustomEditButtons) {
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
      "speedTip": "Ref name",
      "tagOpen": "<ref name=\"\">",
      "tagClose": "</ref>",
      "sampleText": "Text reference, nejlépe citační šablona"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/ea/Button_easy_cite.png",
      "speedTip": "Citát",
      "tagOpen": "\x7b\x7bCitát|",
      "tagClose": "|}}",
      "sampleText": "Citovaný text"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/91/Button_cite_web.png",
      "speedTip": "Citace elektronické monografie (citace webu, např. Valka.cz, Antika.avonet.cz)",
      "tagOpen": "\x7b\x7bCitace elektronické monografie\n | příjmení = \n | jméno = \n | odkaz na autora = \n | titul = \n | url = \n | datum vydání = \n | datum aktualizace = \n | datum přístupu = " + (y = new Date().getFullYear ()) + "-" + (m = new Date ().getMonth () + 1) + "-" + (d = new Date ().getDate ()) + "\n | vydavatel = \n | místo = \n | jazyk = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/2c/Button_cite_news.png",
      "speedTip": "Citace elektronického periodika (citace online zpravodajství, např. Aktuálně.cz, Novinky.cz)",
      "tagOpen": "\x7b\x7bCitace elektronického periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | datum vydání = \n | datum aktualizace = \n | datum přístupu = " + (y = new Date().getFullYear ()) + "-" + (m = new Date ().getMonth () + 1) + "-" + (d = new Date ().getDate ()) + "\n | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/49/Button_cite_journal.png",
      "speedTip": "Citace periodika (citace novin, časopisu)",
      "tagOpen": "\x7b\x7bCitace periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | rok = \n | měsíc = \n | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/ef/Button_cite_book.png",
      "speedTip": "Citace monografie (citace knihy)",
      "tagOpen": "\x7b\x7bCitace monografie\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n | rok = \n | titul = \n | vydavatel = \n | místo = \n | stránky = \n | poznámka = \n | isbn = \n}}",
      "tagClose": "",
      "sampleText": ""};
  mwCustomEditButtons [mwCustomEditButtons.length] =  {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/bb/Button_ébauche.png",
    "speedTip": "Citace sborníku",
    "tagOpen": "\x7b\x7bCitace sborníku\n | příjmení = \n | jméno = \n | odkaz na autora = \n | příjmení2 = \n | jméno2 = \n | odkaz na autora2 = \n | spoluautoři = \n | titul = \n | odkaz na titul = \n | příjmení sestavitele = \n | jméno sestavitele = \n | odkaz na sestavitele = \n | sborník = \n | odkaz na sborník = \n | url = \n | vydavatel = \n | místo = \n | datum vydání = \n | rok vydání = \n | měsíc vydání = \n | den vydání = \n | isbn = \n | svazek = \n | strany = \n | jazyk = \n}}",
    "tagClose": "",
    "sampleText": "" };
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/38/Button_plume.png",
      "speedTip": "Citát bible",
      "tagOpen": "\x7b\x7bCitát bible|",
      "tagClose": "||||}}",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/64/Button_nbsp_bold.png",
      "speedTip": "Pevná mezera",
      "tagOpen": "&nbsp;",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/1b/Button_hide_wiki_tag.png",
      "speedTip": "Comment",
      "tagOpen": "<!--",
      "tagClose": "-->",
      "sampleText": "Skrytý text"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e4/Warn2.png",
      "speedTip": "Ve výstavbě",
      "tagOpen": "\x7b\x7bVe výstavbě}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/84/Warn3.png",
      "speedTip": "Pracuje se",
      "tagOpen": "\x7b\x7bPracuje se}}",
      "tagClose": "",
      "sampleText": ""};
  };

/*Zobrazí UTC čas vlevo nahoře*/
function liveClock()
{
 
	liveClock.node = mw.util.addPortletLink( 'p-personal', mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?title=' + wgPageName + '&action=purge', '', 'utcdate' );
	liveClock.node.style.fontSize = 'larger';
	liveClock.node.style.fontWeight = 'bolder';
 
	showTime();
}
$(liveClock)
 
function showTime()
{
 
	var dateNode = liveClock.node;
	if( !dateNode ) {
		return;
	}
    var now = new Date();
        var hh = now.getHours();
        var mm = now.getMinutes();
        var ss = now.getSeconds();
	var time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss );
	dateNode.firstChild.replaceChild( document.createTextNode( time ), dateNode.firstChild.firstChild );
 
    window.setTimeout(showTime, 1000);
}
 
mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');
 
popupAdminLinks=true;
 
function Deadliner ()
  {
  nodDeadliner = document.getElementById ("Deadliner");
  if (nodDeadliner != null)
    {
    datDeadline = new Date ();
    datDeadline.setDate (datDeadline.getDate () - 30);
    strPassedDeadline = datDeadline.getDate () + ". " + (datDeadline.getMonth () + 1) + ". " + datDeadline.getFullYear ();
    nodDeadliner.innerHTML = strPassedDeadline;
    }
  }
 
function addCssJsLinks ()
{
  var nodCSSli = document.createElement ("li");
  var nodJSli = document.createElement ("li");
  nodCSSli.id = "pt-css";
  nodJSli.id = "pt-js";
  var nodCSSa = document.createElement ("a");
  var nodJSa = document.createElement ("a");
  nodCSSa.href = "/wiki/Wikipedista:Blanche_de_Besantsaunt/monobook.css";
  nodJSa.href = "/wiki/Wikipedista:Blanche_de_Besantsaunt/monobook.js";
  nodCSSa.appendChild (document.createTextNode ("CSS"));
  nodJSa.appendChild (document.createTextNode ("JS"));
  nodCSSli.appendChild (nodCSSa);
  nodJSli.appendChild (nodJSa);
 
  nodLinksList = document.getElementById ("pt-watchlist").parentNode;
  nodLinksList.insertBefore (nodCSSli, document.getElementById ("pt-watchlist"));
  nodLinksList.insertBefore (nodJSli, document.getElementById ("pt-watchlist"));
}
 
if (window.addEventListener)
  {
  window.addEventListener ("load", Deadliner, false)
  window.addEventListener ("load", addCssJsLinks, false)
  }
else if (window.attachEvent)
  {
  window.attachEvent ("onload", Deadliner)
  window.attachEvent ("onload", addCssJsLinks)
  };

//A helper function to add a button to one of the toolbars in the interface.
function addLink(where, url, name, id, title, key, after){
    //* where is the id of the toolbar where the button should be added;
    //   i.e. one of "p-cactions", "p-personal", "p-navigation", or "p-tb".
    //
    //* url is the URL which will be called when the button is clicked.
    //   javascript: urls can be used to do more complex things.
    //
    //* name is what will appear as the name of the button.
    //
    //* id is the id of the button; it's best to define one.  
    //   Use a prefix to make sure its unique. Optional.
    //
    //* title is the tooltip title that gives a longer description 
    //   of the button; if you define a accesskey, mention it here. Optional.
    //
    //* key is the char you want for the accesskey. Optional.
    //
    //* after is the id of the button you want to follow this one. Optional.
    //
    var na = document.createElement('a');
    na.href = url;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    if(id) li.id = id;
    li.appendChild(na);
    var tabs = document.getElementById(where).getElementsByTagName('ul')[0];
    if(after) {
	tabs.insertBefore(li,document.getElementById(after));
    } else {
	tabs.appendChild(li);
    }
    if(id) {
	if(key && title) { ta[id] = [key, title]; }
	else if(key) { ta[id] = [key, '']; }
	else if(title) { ta[id] = ['', title];} 
    }
    // re-render the title and accesskeys from existing code in wikibits.js
    akeytt();
    return li;
}

$( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Nástěnka_správců', 'Nástěnka správců');
 
if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

$( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:WikiProjekt_Kvalita', 'Wikiprojekt Kvalita');
 
if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

$( function (){
addLink('p-navigation', 'http://stats.grok.se/', 'Návštěvnost článků');
 
if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});