📄 post.js
字号:
if(MessageLength>60000){alert("内容不能超过60000个字符!");return false;}
document.form.EditSubmit.disabled = true;
}
//////替换内容
function replace()
{
var arr = showModalDialog("inc/Replace.htm", "", "dialogWidth:22em;dialogHeight:10em;status:0;help:0");
if (arr != null){
var ss;
ss = arr.split("*")
a = ss[0];
b = ss[1];
i = ss[2];
con = IframeID.document.body.innerHTML;
if (i == 1)
{
con = bbsxp_rCode(con,a,b,true);
}else{
con = bbsxp_rCode(con,a,b);
}
IframeID.document.body.innerHTML = con;
}
else IframeID.focus();
}
function bbsxp_rCode(s,a,b,i){
a = a.replace("?","\\?");
if (i==null)
{
var r = new RegExp(a,"gi");
}else if (i) {
var r = new RegExp(a,"g");
}
else{
var r = new RegExp(a,"gi");
}
return s.replace(r,b);
}
//////替换内容结束
function InsertImage(){
url=prompt("请输入图片文件地址:","http://");
if(!url || url=="http://") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("<img src="+url+">");
}
function MediaPlayer(){
var arr = showModalDialog("inc/MediaPlayer.htm", "", "dialogWidth:22em; dialogHeight:10.5em; status:0;help:0");
if (arr != null){
IframeID.focus()
sel=IframeID.document.selection.createRange();
sel.pasteHTML(arr);
}
}
function CleanCode(){
var body = IframeID.document.body;
var html = IframeID.document.body.innerHTML;
html = html.replace(/\<p>/gi,"[$p]");
html = html.replace(/\<\/p>/gi,"[$\/p]");
html = html.replace(/\<br>/gi,"[$br]");
html = html.replace(/\<[^>]*>/g,"");
html = html.replace(/\[\$p\]/gi,"<p>");
html = html.replace(/\[\$\/p\]/gi,"<\/p>");
html = html.replace(/\[\$br\]/gi,"<br>");
IframeID.document.body.innerHTML = html;
}
function Break(){
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("<br>");
}
function insertdate(){
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML(new Date().toLocaleDateString());
}
function inserttime(){
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML(new Date().toLocaleTimeString());
}
function specialchar()
{
var arr = showModalDialog("inc/specialchar.htm", "", "dialogWidth:26em; dialogHeight:16em; status:0;help:0");
IframeID.focus();
sel=IframeID.document.selection.createRange();
if (arr != null)sel.pasteHTML(arr);
}
function BackColor()
{
var arr = showModalDialog("inc/selcolor.htm", "", "dialogWidth:18em; dialogHeight:17.5em; status:0;help:0");
if (arr != null) FormatText('BackColor', arr);
else IframeID.focus();
}
function foreColor()
{
var arr = showModalDialog("inc/selcolor.htm", "", "dialogWidth:18em; dialogHeight:17.5em; status:0;help:0");
if (arr != null) FormatText('forecolor', arr);
else IframeID.focus();
}
//回复查看
function replyview(){
url=prompt("请输入要隐藏的内容:","Null");
if(!url || url=="Null") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("[replyview]"+url+"[/replyview]");
}
//贴子数达到查看
function YBBTopic(){
msg=prompt("请输入数值,如:10 (即限制发贴数在10以下的用户不能浏览该内容!)", "10");
if(!msg || msg=="0") return;
topic=prompt("请输入要隐藏的内容", "Null");
if(!topic || topic=="Null") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("[ybbtopic="+msg+"]");
sel.pasteHTML(topic);
sel.pasteHTML("[/ybbtopic]");
}
//经验查看
function YBBExp(){
msg=prompt("请输入数值,如:10 (即限制经验值在10以下的用户不能浏览该内容!)", "10");
if(!msg || msg=="0") return;
exp=prompt("请输入要隐藏的内容", "Null");
if(!exp || exp=="Null") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("[ybbexp="+msg+"]");
sel.pasteHTML(exp);
sel.pasteHTML("[/ybbexp]");
}
//公会查看
function YBBCon(){
msg=prompt("请输入要隐藏的内容:","Null");
if(!msg || msg=="Null") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("[ybbfaction]"+msg+"[/ybbfaction]");
}
//金币查看
function postjb(){
postjb=prompt("请输入看贴需要达到金币的值:","50");
if(!postjb || postjb=="") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("[postjb="+postjb+"][/postjb]");
}
//用户查看
function postme(){
postme=prompt("请输入看贴用户名字:", "Enger");
if(!postme || postme=="") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("[postme="+postme+"][/postme]");
}
//广告帖
function postad(){
postad=prompt("请输入点击的网址:", "http://127.0.0.1");
if(!postad || postad=="") return;
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("[postad="+postad+"][/postad]");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -