📄 wmbb.js
字号:
function replac(){
if ((helpstat)||(basic)) {alert("替换关键字");}
else {txt2=prompt("请输入搜寻目标关键字","");
if (txt2 != null) {
if (txt2 != "") {txt=prompt("关键字替换为:",txt2)}else {replac()}
var Otext = txt2; var Itext = txt; document.FORM.content.value = eval('FORM.content.value.replace(/'+Otext+'/'+'g'+',"'+Itext+'")')}}}
helpstat = false; stprompt = true; basic = false;
function thelp(swtch){
if (swtch == 1){ basic = false; stprompt = false; helpstat = true;} else if (swtch == 0) {helpstat = false;stprompt = false;basic = true;} else if (swtch == 2) {helpstat = false;basic = false;stprompt = true;}
}
function AddText(NewCode) {document.FORM.content.value+=NewCode}
function email() {
if (helpstat) { alert("Email 标记\n插入 Email 超级链接\n用法1: [email]webmaster@CGIer.com[/email]\n用法2: [email=webmaster@CGIer.com]山鹰(糊)[/email]");
} else if (basic) { AddTxt="[email][/email]";AddText(AddTxt);
} else { txt2=prompt("链接显示的文字.\n如果为空,那么将只显示你的 Email 地址","");
if (txt2!=null) {txt=prompt("Email 地址.","name@domain.com");
if (txt!=null) {
if (txt2=="") {AddTxt="[email]"+txt+"[/email]";} else {AddTxt="[email="+txt+"]"+txt2;AddText(AddTxt);AddTxt="[/email]";}
AddText(AddTxt);
}}}}
function showsize(size) {
if (helpstat) {alert("文字大小标记\n设置文字大小.\n可变范围 1 - 6.\n 1 为最小 6 为最大.\n用法: [size="+size+"]这是 "+size+" 文字[/size]");
} else if (basic) {AddTxt="[size="+size+"][/size]";AddText(AddTxt);
} else {txt=prompt("大小 "+size,"文字");
if (txt!=null) {AddTxt="[size="+size+"]"+txt;AddText(AddTxt);AddTxt="[/size]";AddText(AddTxt);}}
}
function bold() {
if (helpstat) {alert("加粗标记\n使文本加粗.\n用法: [b]这是加粗的文字[/b]");
} else if (basic) {AddTxt="[b][/b]";AddText(AddTxt);} else {txt=prompt("文字将被变粗.","文字");
if (txt!=null) {AddTxt="[b]"+txt;AddText(AddTxt);AddTxt="[/b]";AddText(AddTxt);}}
}
function italicize() {
if (helpstat) {alert("斜体标记\n使文本字体变为斜体.\n用法: [i]这是斜体字[/i]");} else if (basic) {
AddTxt="[i][/i]";AddText(AddTxt);} else { txt=prompt("文字将变斜体","文字");
if (txt!=null) {AddTxt="[i]"+txt;AddText(AddTxt);AddTxt="[/i]";AddText(AddTxt);}}
}
function setsound() {
if (helpstat) {alert("声音标记\n产生背景音乐.\n用法: [sound]音乐文件的地址[/sound]");} else if (basic) {
AddTxt="[sound][/sound]";AddText(AddTxt);} else { txt=prompt("产生背景音乐.","http://");
if (txt!=null) { AddTxt="[sound]"+txt;AddText(AddTxt);AddTxt="[/sound]";AddText(AddTxt);}}
}
function showcolor(color) {
if (helpstat) {alert("颜色标记\n设置文本颜色. 任何颜色名都可以被使用.\n用法: [color="+color+"]颜色要改变为"+color+"的文字[/color]");
} else if (basic) {AddTxt="[color="+color+"][/color]";AddText(AddTxt);} else { txt=prompt("选择的颜色是: "+color,"文字");
if(txt!=null) {AddTxt="[color="+color+"]"+txt;AddText(AddTxt);AddTxt="[/color]";AddText(AddTxt);}}
}
function setfly() {
if (helpstat){alert("飞翔标记\n使文字飞行.\n用法: [fly]文字为这样文字[/fly]");} else if (basic) {
AddTxt="[fly][/fly]";AddText(AddTxt);} else { txt=prompt("飞翔文字","文字");
if (txt!=null) { AddTxt="[fly]"+txt;AddText(AddTxt);AddTxt="[/fly]";AddText(AddTxt);}}
}
function move() {
if (helpstat) {alert("移动标记\n使文字产生移动效果.\n用法: [move]要产生移动效果的文字[/move]");} else if (basic) {
AddTxt="[move][/move]";AddText(AddTxt);} else { txt=prompt("要产生移动效果的文字","文字");
if (txt!=null) { AddTxt="[move]"+txt;AddText(AddTxt);AddTxt="[/move]";AddText(AddTxt);}}
}
function shadow() {
if (helpstat) {alert("阴影标记\n使文字产生阴影效果.\n用法: [shadow=宽度, 颜色, 边界]要产生阴影效果的文字[/shadow]");} else if (basic) {
AddTxt="[shadow=255,blue,1][/shadow]";AddText(AddTxt);} else { txt2=prompt("文字的长度、颜色和边界大小","255,blue,1");
if (txt2!=null) {txt=prompt("要产生阴影效果的文字","文字");if (txt!=null) {if (txt2=="") {
AddTxt="[shadow=255, blue, 1]"+txt;AddText(AddTxt);AddTxt="[/shadow]";AddText(AddTxt);} else {
AddTxt="[shadow="+txt2+"]"+txt;AddText(AddTxt);AddTxt="[/shadow]";AddText(AddTxt);}}}}
}
function glow() {
if (helpstat) {alert("光晕标记\n使文字产生光晕效果.\n用法: [GLOW=宽度, 颜色, 边界]要产生光晕效果的文字[/GLOW]");} else if (basic) {
AddTxt="[glow=255,red,2][/glow]";AddText(AddTxt);} else { txt2=prompt("文字的长度、颜色和边界大小","255,red,2"); if (txt2!=null) {
txt=prompt("要产生光晕效果的文字.","文字"); if (txt!=null) {if (txt2=="") {AddTxt="[glow=255,red,2]"+txt;AddText(AddTxt);AddTxt="[/glow]";AddText(AddTxt);
} else {AddTxt="[glow="+txt2+"]"+txt;AddText(AddTxt);AddTxt="[/glow]";AddText(AddTxt);}}}}
}
function center() {
if (helpstat) {alert("对齐标记\n使用这个标记, 可以使文本左对齐、居中、右对齐.\n用法: [align=center|left|right]要对齐的文本[/align]");} else if (basic) {
AddTxt="[align=center|left|right][/align]";AddText(AddTxt);} else {txt2=prompt("对齐样式\n输入 'center' 表示居中, 'left' 表示左对齐, 'right' 表示右对齐.","center");
while ((txt2!="") && (txt2!="center") && (txt2!="left") && (txt2!="right") && (txt2!=null)) {txt2=prompt("错误!\n类型只能输入 'center' 、 'left' 或者 'right'.","");}
txt=prompt("要对齐的文本","文本");if (txt!=null) {AddTxt="\r[align="+txt2+"]"+txt;AddText(AddTxt);AddTxt="[/align]";AddText(AddTxt);}}
}
function hyperlink() {
if (helpstat) {alert("超级链接标记\n插入一个超级链接标记\n使用方法: [url]http://www.cgier.com[/url]\nUSE: [url=http://www.cgier.com]链接文字[/url]");
} else if (basic) {AddTxt="[url][/url]";AddText(AddTxt);} else { txt2=prompt("链接文本显示.\n如果不想使用, 可以为空, 将只显示超级链接地址. ","");
if (txt2!=null) {txt=prompt("超级链接.","http://");if (txt!=null) {
if (txt2=="") {AddTxt="[url]"+txt;AddText(AddTxt);AddTxt="[/url]";AddText(AddTxt);} else {AddTxt="[url="+txt+"]"+txt2;AddText(AddTxt);AddTxt="[/url]";AddText(AddTxt);}}}}
}
function image() {
if (helpstat){alert("图片标记\n插入图片\n用法: [img]http://www.CGIer.com/cgi.gif[/img]");} else if (basic) {AddTxt="[img][/img]";AddText(AddTxt);} else { txt=prompt("图片的 URL","http://");
if(txt!=null) { AddTxt="\r[img]"+txt;AddText(AddTxt);AddTxt="[/img]";AddText(AddTxt);}}
}
function showfont(font) {
if(font=="else"){font=prompt("要设置字体的字体","")}
if (helpstat){alert("字体标记\n给文字设置字体.\n用法: [font="+font+"]改变文字字体为"+font+"[/font]");} else if (basic) {
AddTxt="[font="+font+"][/font]";AddText(AddTxt);} else {txt=prompt("要设置字体的文字"+font,"文字");
if (txt!=null) {AddTxt="[font="+font+"]"+txt;AddText(AddTxt);AddTxt="[/font]";AddText(AddTxt);}}
}
function underline() {
if (helpstat) {alert("下划线标记\n给文字加下划线.\n用法: [u]要加下划线的文字[/u]");} else if (basic) {
AddTxt="[u][/u]";AddText(AddTxt);} else { txt=prompt("下划线文字.","文字");
if (txt!=null) { AddTxt="[u]"+txt;AddText(AddTxt);AddTxt="[/u]";AddText(AddTxt);}}
}
function inputs(str){document.REPLIER.icon.value=str;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -