// we use it to avoid creating the toolbar where javascript is not enabled
function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText) {
+
speedTip=escapeQuotes(speedTip);
tagOpen=escapeQuotes(tagOpen);
tagClose=escapeQuotes(tagClose);
return;
}
+function addInfobox(infoText) {
+
+ // if no support for changing selection, add a small copy & paste field
+ var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+ var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
+ && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
+ && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
+ if(!document.selection && !is_nav) {
+ document.write("<form name='infoform' id='infoform'>"+
+ "<input size=80 id='infobox' name='infobox' value='"+
+ infoText+"' READONLY></form>");
+ }
+
+}
+
function escapeQuotes(text) {
text=text.replace(/'/g,"\\'");
txtarea.selectionEnd=cPos;
// All others
} else {
- txtarea.value += tagOpen + sampleText + tagClose;
+ // Append at the end: Some people find that annoying
+ //txtarea.value += tagOpen + sampleText + tagClose;
+ //txtarea.focus();
+ tagOpen=tagOpen.replace(/\n/g,"");
+ tagClose=tagClose.replace(/\n/g,"");
+ document.infoform.infobox.value=tagOpen+sampleText+tagClose;
txtarea.focus();
}
// reposition cursor if possible
if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate();
-}
\ No newline at end of file
+}
#topbar { padding: 4px;font-size:95%; }
#toc { border:1px solid #8888aa; background-color:#f7f8ff;padding:5px;font-size:95%; }
#toolbar { padding:0px; }
+#infobox { background:#eeeeff;color:black;;}
#editform { margin-top:1px; }
.bodytext { }
a.interwiki, a.external { color: #3366BB; }