User:Spiritia/monobook.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
The accompanying .css page for this skin can be added at User:Spiritia/monobook.css. |
- Report page listing warnings and errors.
/* Script Quicklinks, written by User:Borislav, originally for Bulgarian Wikipedia */
document.write('<script type="text/javascript" src="http://bg.wikipedia.org/w/index.php?title=%D0%9C%D0%B5%D0%B4%D0%B8%D1%8F%D0%A3%D0%B8%D0%BA%D0%B8:Common.js/Core.js&action=raw&ctype=text/javascript"></scr'+'ipt>');
document.write('<script type="text/javascript" src="http://bg.wikipedia.org/w/index.php?title=%D0%9C%D0%B5%D0%B4%D0%B8%D1%8F%D0%A3%D0%B8%D0%BA%D0%B8:Common.js/CoreObjects.js&action=raw&ctype=text/javascript"></scr'+'ipt>');
document.write('<script type="text/javascript" src="http://bg.wikipedia.org/w/index.php?title=%D0%9C%D0%B5%D0%B4%D0%B8%D1%8F%D0%A3%D0%B8%D0%BA%D0%B8:Gadget-quicklinks.js&action=raw&ctype=text/javascript"></scr'+'ipt>');
document.write('<script type="text/javascript" src="http://bg.wikipedia.org/w/index.php?title=%D0%9F%D0%BE%D1%82%D1%80%D0%B5%D0%B1%D0%B8%D1%82%D0%B5%D0%BB:Borislav/mwbot.js&action=raw&ctype=text/javascript"></scr'+'ipt>');
/* End of the Quicklinks gadget */
/* Script DeluxeBar for adding new customised buttons to the edit toolbar. Written by bg:User:Ikonact, originally for Bulgarian Wikipedia */
function putToolbar(rightNow) {
var toolbar = Creator.createElement("div", {"id" : "toolbar"});
var putIt = function() {
var editform = document.getElementById("editform");
editform.parentNode.insertBefore(toolbar, editform);
};
if ( typeof rightNow != "undefined" && rightNow ) {
putIt();
} else {
$(putIt);
}
return toolbar;
}
function DeluxeBar() {
if (document.createTextNode) {
var toolbar = document.getElementById("toolbar");
if ( !toolbar ) {
if ( ! document.getElementById("editform") ) {
return;
}
// check for the enhanced toolbar
if ( getElementsByClassName(document, "div", "toolbar").length ) {
toolbar = putToolbar(true);
} else {
return;
}
}
var messages = new Array()
var images = new Array()
var title = new Array()
var commentaires = new Array()
var a=-1; // Броенето започва от -1, като се увеличава още на първото съобщение, за да избегне проблеми при изтриване му
////////////////////////////////
//// зона за персонализация ////
////////////////////////////////
// текстът е "сплитнат", за да се избегне конфликт с Медияуики
messages[++a] = ["== Summary ==\\n{{Information\\n|Description= \\n{{bg|", "}}\\n{"+"{en|}}\\n|Source= \\n|Author= \\n|Date= \\n|Permission= \\n|other_versions= \\n}}"];
images[a] = "";
commentaires[a] = ""
title[a] = "Information "
messages[++a] = ["== Licensing ==\\n{"+"{ifb-cc-by-2.5|", "|}}"];
images[a] = "";
commentaires[a] = ""
title[a] = "IFB "
messages[++a] = ["["+"[:|", "]]"];
images[a] = "";
commentaires[a] = ""
title[a] = "pipelink "
messages[++a] = ["["+"[:bg:|", "]]"];
images[a] = "";
commentaires[a] = ""
title[a] = ":bg: "
messages[++a] = ["["+"[:en:|", "]]"];
images[a] = "";
commentaires[a] = ""
title[a] = ":en: "
messages[++a] = ["{"+"{bg|", "}}"];
images[a] = "";
commentaires[a] = ""
title[a] = "{bg|} "
messages[++a] = ["{"+"{en|", "}}"];
images[a] = "";
commentaires[a] = ""
title[a] = "{en|} "
messages[++a] = ["<"+"!--", "-->"];
images[a] = "";
commentaires[a] = ""
title[a] = "commented "
messages[++a] = ["["+"[Category:", "]]"];
images[a] = "";
commentaires[a] = ""
title[a] = "category "
messages[++a] = ["{"+"{category redirect|", "}}"];
images[a] = "";
commentaires[a] = ""
title[a] = "catredirect "
messages[++a] = ["{"+"{cat see also|", "}}"];
images[a] = "";
commentaires[a] = ""
title[a] = "catseealso "
messages[++a] = ["== Summary ==\\n{"+"{Information\\n|Description={"+"{bg|Карта на село ["+"[:bg:", "|]], България}}\\n|Source= [ Generated with SimplestMapEditor v.0.9]\\n|Date= \\n|Author=Original author was ["+"[:bg:User:5ko|Petko Yotov]] at ["+"http://bg.wikipedia.org bg.wikipedia]\\n|Permission=Released under the GNU Free Documentation License\\n|other_versions=\\n}}\\n\\n== License information ==\\n{"+"{dot5ko| | | | }}\\n\\n["+"[Category:Locator maps of Bulgaria]]"];
images[a] = "";
commentaires[a] = ""
title[a] = "locatormap "
////////////////////////////////
// край на персонализацията
////////////////////////////////
for (var i=0;i<messages.length;i++) {
var img = document.createElement("img");
img.setAttribute("src", images[i]);
var ref = document.createElement("a");
ref.setAttribute("href", "javascript:insertTags(\"" + messages[i][0] + "\", \"" + messages[i][1] + "\", '');" +
"javascript:changeSummary(\"" + commentaires[i] + "\");" );
ref.setAttribute("title", "" + commentaires[i] + "" );
//ref.appendChild(img);
ref.appendChild(document.createTextNode(title[i]));
toolbar.appendChild(ref);
}
}
}
function changeSummary(sampleText) {
document.editform.wpSummary.value = sampleText;
}
hookEvent('load', DeluxeBar);
/* End of script enabling the addition of new buttons in the edit toolbar */