Bikarhêner:Gangleri/monobook.js: Cudahiya di navbera guhartoyan de

Content deleted Content added
wpUserName = 'Gangleri'; // User name to display in signatures
B changing the directionality of the edit box; java script made by meta:user:Brion VIBBER
Rêz 1:
function bidiSwitchSetup() {
// Live Preview customization,
var editform = document.getElementById("editform");
// edit this to your own liking.
if (editform == null) {
 
return;
wpUserName = 'Gangleri'; // User name to display in signatures
}
wpShowImages = true; // Enable downloading and displaying of images
 
bidiAddButton(editform, "Default", function(style) {
// Include Live Preview...
style.direction = "inherit";
document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
style.unicodeBidi = "inherit";
 
});
// Now set everything up
bidiAddButton(editform, "dir=ltr", function(style) {
window.onload = Main;
style.direction = "ltr";
});
bidiAddButton(editform, "dir=rtl", function(style) {
style.direction = "rtl";
});
bidiAddButton(editform, "bidi=normal", function(style) {
style.unicodeBidi = "normal";
});
bidiAddButton(editform, "bidi=override", function(style) {
style.unicodeBidi = "bidi-override";
});
}
 
function MainbidiAddButton(before, label, action) {
var button = document.createElement("input");
{
button.type = "button";
LivePreviewInstall();
button.value = label;
// You may include here other "extensions"
button.onclick = function(event) {
var box = document.getElementById("wpTextbox1");
if (box == null) {
alert("Broken! Edit box missing.");
} else {
//var style = document.getOverrideStyle(box, null);
var style = box.style;
action(style);
}
}
before.parentNode.insertBefore(button, before);
}
 
hookEvent('load', bidiSwitchSetup);
/* This is to keep track of who is using the Live Preview: [[User:Pilaf/livepreview.js]] */