就是加以下代码:
function wmv() {
if (helpmode){
alert(wmv_help);
} else if (getSelectedText()) {
var range = document.selection.createRange();
range.text = "[wmv=360,300,1]" + range.text + "[/wmv]";
} else if (advmode) {
AddTxt="[wmv=360,300,1]http://[/wmv]";
AddText(AddTxt);
} else {
txt=prompt(wmv_normal,"http://");
if (txt!=null){
txt2=prompt(media_input1,"360");
txt3=prompt(media_input2,"300");
txt4=prompt(media_input3,"1");
txt2=txt2==null?'360':txt2;
txt3=txt3==null?'300':txt3;
txt4=txt4==null?'0':txt4;
if (txt2!="" && txt3!="" && txt4!=""){
AddTxt="[wmv="+txt2+","+txt3+","+txt4+"]"+txt;
AddText(AddTxt);
AddText("[/wmv]");
}else{
AddTxt="[wmv=360,300,1]"+txt;
AddText(AddTxt);
AddText("[/wmv]");
}
}
}
}
function rm() {
if (helpmode){
alert(rm_help);
} else if (getSelectedText()) {
var range = document.selection.createRange();
range.text = "[rm=360,300,1]" + range.text + "[/rm]";
} else if (advmode) {
AddTxt="[rm=360,300,1]http://[/rm]";
AddText(AddTxt);
} else {
txt=prompt(wmv_normal,"http://");
if (txt!=null){
txt2=prompt(media_input1,"360");
txt3=prompt(media_input2,"300");
txt4=prompt(media_input3,"1");
txt2=txt2==null?'360':txt2;
txt3=txt3==null?'300':txt3;
txt4=txt4==null?'0':txt4;
if (txt2!="" && txt3!="" && txt4!=""){
AddTxt="[rm="+txt2+","+txt3+","+txt4+"]"+txt;
AddText(AddTxt);
AddText("[/rm]");
}else{
AddTxt="[rm=360,300,1]"+txt;
AddText(AddTxt);
AddText("[/rm]");
}
}
}
}
function gcx_mp3() {
if (helpmode) {
alert(gcx_help);
} else if (getSelectedText()) {
var range = document.selection.createRange();
range.text = "[gcx]" + range.text + "[/gcx][mp3]http://[/mp3]";
} else if (advmode) {
AddTxt="\r[gcx]"+gcx_help+"[/gcx][mp3]http://[/mp3]";
AddText(AddTxt);
} else {
txt=prompt(wmv_normal,"http://");
if (txt!=null) {
AddTxt="\r[gcx]"+gcx_help;
AddText(AddTxt);
AddText("[/gcx][mp3]"+txt+"[/mp3]");
}
}
}
function gcx_ron() {
if (helpmode) {
alert(gcx_help);
} else if (getSelectedText()) {
var range = document.selection.createRange();
range.text = "[gcx]" + range.text + "[/gcx][ron]http://[/ron]";
} else if (advmode) {
AddTxt="\r[gcx]"+gcx_help+"[/gcx][ron]http://[/ron]";
AddText(AddTxt);
} else {
txt=prompt(wmv_normal,"http://");
if (txt!=null) {
AddTxt="\r[gcx]"+gcx_help;
AddText(AddTxt);
AddText("[/gcx][ron]"+txt+"[/ron]");
}
}
}
function hide() {
if (helpmode) {
alert(hide_help);
} else if (getSelectedText()) {
var range = document.selection.createRange();
range.text = "[hide]" + range.text + "[/hide]";
} else if (advmode) {
AddTxt="[hide]"+hide_normal+"[/hide]";
AddText(AddTxt);
} else {
txt1=prompt(hide_credit,0);
txt=prompt(hide_help,hide_normal);
txt1=txt1==0 || !txt1?'':"="+txt1;
if (txt!=null) {
AddTxt="[hide"+txt1+"]"+txt;
AddText(AddTxt);
AddText("[/hide]");
}
}
} |