Wikipedista:Chmee2/monobook.js
Vzhled
Poznámka: Po uložení musíte vyprázdnit mezipaměť vašeho prohlížeče, jinak změny neuvidíte.
// --------- custom edit toolbar ---------
// Repair by Juandev due to mwCustomEditButtons loss
mw.loader.using('mediawiki.action.edit', function () {
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/a/a5/Buttonexperimenty.png",
speedTip: "Experimenty",
tagOpen: "\x7b\x7bsubst:experimenty}} \x7E\x7E\x7E\x7E",
tagClose: "",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/en/c/c8/Button_redirect.png",
speedTip: "Přesměrování",
tagOpen: "#REDIRECT [[",
tagClose: "]]",
sampleText: "cíl"
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/1/16/Buttonexperimenty2.png",
speedTip: "Experimenty2",
tagOpen: "\x7b\x7bsubst:experimenty2}} \x7E\x7E\x7E\x7E",
tagClose: "",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/4/4a/Button_welcome.png",
speedTip: "Vítejte",
tagOpen: "\x7b\x7bsubst:vítejte}} \x7E\x7E\x7E\x7E",
tagClose: "",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/f/f8/Button_Tool_commons.png",
speedTip: "Commons",
tagOpen: "\x7b\x7bCommons|",
tagClose: "}}",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/6/6c/Button_commons.png",
speedTip: "CommonsPresun",
tagOpen: "\x7b\x7bsubst:Používejte Commons}} \x7E\x7E\x7E\x7E",
tagClose: "",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/9/91/Button_cite_web.png",
speedTip: "Citace elektronické monografie (webu)",
tagOpen: "<ref>\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}}</ref>",
tagClose: "",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/4/46/Topdown1.png",
speedTip: "Infobox chráněné území v Česku",
tagOpen: "\x7b\x7bInfobox chráněné území v Česku\n| typ = \n| název =\n| foto = \n| popis = \n| vyhlášena = [[]] \n| vyhlásil = \n| úsop = \n| lokalita = \n| výška = – \n| výměra = \n| okres = \n| poznámky = \n| commons = Category: \n}}",
tagClose: "",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
var button = { id: 'button-comment',
imageFile: "/media/wikipedia/commons/b/b8/Button_Globe.png",
speedTip: "České GEO",
tagOpen: "{{Geo cz|xx|xx|xx.x|yy|yy|yy.y}}",
tagClose: "",
sampleText: ""
};
mw.toolbar.addButton(button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id);
});
//End of toolbar script
function insertGeoCz() {
var strGeoLoc = window.prompt( "Zadejte lokaci", "" );
if( strGeoLoc ) {
strGeoCz = strGeoLoc.replace( / *(?:Loc:)? *(\d+)°(\d+)'([\d.]+)"N[,;] *(\d+)°(\d+)'([\d.]+)"E */, "{{Geo cz|$1|$2|$3|$4|$5|$6}}" );
insertTags( strGeoCz , "", "");
}
}
function addInsertGeoCzButton() {
var nodToolbar = document.getElementById( "toolbar" );
if( nodToolbar ) {
var nodGeoCz = document.createElement( "img" );
nodGeoCz.src = "/media/wikipedia/commons/b/b8/Button_Globe.png";
nodGeoCz.title = "Geo cz";
var nodGeoCzClick = document.createAttribute( "onclick" );
nodGeoCzClick.value = "insertGeoCz();";
nodGeoCz.setAttributeNode( nodGeoCzClick );
nodToolbar.appendChild( nodGeoCz );
}
}
if (window.addEventListener)
{
window.addEventListener ("load", addInsertGeoCzButton, false)
}
else if (window.attachEvent)
{
window.attachEvent ("onload", addInsertGeoCzButton)
};