📄 reply.js
字号:
var Newasp_filterScript = true;
var Newasp_charset="UTF-8";
var Newasp_bLoad=false
var Newasp_bTextMode=3;
//var Newasp_bIsIE5=document.all
//if (Newasp_bIsIE5)
//{var IframeID=frames["Newasp_Composition"];}
//else
//{
//var IframeID=document.getElementById("Newasp_Composition").contentWindow;
//}
//Newasp_InitDocument('Body','gb2312')
function Newasp_InitDocument(hiddenid, charset)
{
//myform
if (charset!=null){Newasp_charset=charset;}
if (Newasp_bIsIE5){
var Newasp_bodyTag="<style type=text/css>.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#F3F3F3 }\nbody{boder:0px}.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#FDFDDF;font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;}\nbody{boder:0px}</style></head><BODY bgcolor=\"#FFFFFF\" title=\"Ctrl+Enter直接提交贴子\" onkeydown=\"ctlent();\">";
}else
{
var Newasp_bodyTag="<style type=text/css>.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#F3F3F3 }\nbody{boder:0px}.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#FDFDDF;font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;}\nbody{boder:0px}</style></head><BODY bgcolor=\"#FFFFFF\" >";
}
var editor=IframeID
var h=document.getElementById(hiddenid).value;
if (navigator.appVersion.indexOf("MSIE 6.0",0)==-1){
editor.document.designMode="On"
}
editor.document.open();
editor.document.write ('<html><head>');
if (Newasp_bIsIE5){
editor.document.write ('<script language="javascript">');
editor.document.write ('var ispost=0;');
editor.document.write (' function ctlent()');
editor.document.write (' {');
editor.document.write (' if(event.ctrlKey && window.event.keyCode==13&&ispost==0)');
editor.document.write (' {');
editor.document.write (' ispost=1;');
editor.document.write (' parent.Newasp_CopyData("'+hiddenid+'"); ');
editor.document.write (' parent.document.myform.submit();');
editor.document.write (' }');
editor.document.write (' }');
editor.document.write ('<\/script>');
}
editor.document.write(Newasp_bodyTag);
if (h!="")
{
h=Newasp_FilterScript(h);
editor.document.write(h);
}
editor.document.write ("</body>");
editor.document.write ("</html>");
editor.document.close();
editor.document.body.contentEditable = "True";
editor.document.charset=Newasp_charset;
Newasp_bLoad=true;
Newasp_setStyle();
}
function Newasp_setStyle()
{
//var bs = IframeID.document.body.runtimeStyle;
var bs = IframeID.document.body.style;
//根据mode设置iframe样式表
if (Newasp_bTextMode==2) {
bs.fontFamily="Arial";
bs.fontSize="10pt";
}else{
bs.fontFamily="Arial";
bs.fontSize="10.5pt";
}
bs.scrollbar3dLightColor= '#D4D0C8';
bs.scrollbarArrowColor= '#000000';
bs.scrollbarBaseColor= '#D4D0C8';
bs.scrollbarDarkShadowColor= '#D4D0C8';
bs.scrollbarFaceColor= '#D4D0C8';
bs.scrollbarHighlightColor= '#808080';
bs.scrollbarShadowColor= '#808080';
bs.scrollbarTrackColor= '#D4D0C8';
bs.border='1';
}
function Newasp_CopyData(hiddenid)
{
if (Newasp_bTextMode==2)
{
cont=IframeID.document.body.innerText;
}else{
cont=IframeID.document.body.innerHTML;
}
var ChekEmptyCode=Newasp_ChekEmptyCode(cont);
if (ChekEmptyCode=='' || ChekEmptyCode==null)
{
cont='';
}
else{
cont=Newasp_correctUrl(cont);
if (Newasp_filterScript)
cont=Newasp_FilterScript(cont);
}
document.getElementById(hiddenid).value = cont;
}
//格式化链接
function Newasp_correctUrl(cont)
{
var url=location.href.substring(0,location.href.lastIndexOf("/")+1);
cont=Newasp_rCode(cont,location.href+"#","#");
//cont=Newasp_rCode(cont,url,"");
var regExp = /<(a[^>]*) href=([^ |>]*)([^>]*)/gi
cont = cont.replace(regExp, "<$1 href=$2 target=\"_blank\" ") ;
return cont;
}
function Newasp_FilterScript(content)
{
content = Newasp_rCode(content, 'javascript:', '<b>javascript</b> :');
var RegExp = /<script[^>]*>(.*)<\/script>/ig;
content = content.replace(RegExp, "<div class=HtmlCode><!-- Script 代码开始 --><br>$1<br><!-- Script 代码结束 --></div>");
return content;
}
function Newasp_rCode(s,a,b,i){
//s原字串,a要换掉pattern,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 Newasp_ChekEmptyCode(html) {
//html = html.replace(/ |<|>/gi, "");
html = html.replace(/\<[^>]*>/g,""); ///过滤其它所有"<...>"标签
html = html.replace(/ /gi, "");
html = html.replace(/o:/gi, "");
html = html.replace(/\s/gi, "");
return html;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -