<html>
<head>
<title>【汇精坊图像处理网】转贴工具-可屏蔽干扰码 </title>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
.STYLE2 {font-size: 12px}
.STYLE4 {font-size: 14; }
-->
</style>
<SCRIPT language=JavaScript>
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
//-->
</SCRIPT>
<SCRIPT language=JavaScript1.2>
function delnull()
{
var str=document.getElementById('text').value;
str=str.replace(/([\s]*\r\n[\s]*){2,}/gm,"\r\n");
document.getElementById('text').value=str;
}
function refix()
{
var str=document.getElementById('text').value;
str=str.replace(/([\s]*\r\n[\s]*){2,}/gm,"\r\n\r\n");
document.getElementById('text').value=str;
}
function url()
{
var str=document.getElementById('text').value;
str=str.replace(/^[ ]*(http:\/\/|^mms:\/\/|rtsp:\/\/|pnm:\/\/|ftp:\/\/|mmst:\/\/|mmsu:\/\/)([^\r\n]*)$/igm,"$1$2");
document.getElementById('text').value=str;
}
function addbr()
{
var str=document.getElementById('text').value;
str=str.replace(/\r\n/gm,"\r\n\r\n");
document.getElementById('text').value=str;
}
function html_trans(str) {
str = str.replace(/\r/g,"");
str = str.replace(/on(load|click|dbclick|mouseover|mousedown|mouseup)="[^"]+"/ig,"");
str = str.replace(/<script[^>]*?>([\w\W]*?)<\/script>/ig,"");
if(set.fontbash.checked)
{
str = str.replace(/<span[^>]*?display\s*?:\s*?none[^>]*?>([\w\W]*?)<\/span>/ig,"");
str = str.replace(/<span[^>]*?font\s*?-\s*?size\s*?:\s*(0px|0pt)[^>]*?>([\w\W]*?)<\/span>/ig,"");
str = str.replace(/<font([^>]+)(0px|0pt)+([^>]*)>([\w\W]*?)<\/font>/ig,"");
}
if(set.filtrate.checked)
{
str = str.replace(/[^<]*<([^>]*?)>[^<]*/ig,"<$1>");
tm=window.textfield.value;
if(tm.length<1){
var arr;
arr=str.match(/<img[^>]+src=[" ]?([^"]+)[" ]?[^>]*>/ig);
tm=arr[0].replace(/<img[^>]+src=[" ]?([^"]+)[" ]?[^>]*>/ig,"$1")+"\"";
i=tm.search(/\/[^\/]+"/ig);
tm=tm.substr(0,i);
window.textfield.value=tm+"/";
}
if(tm.substr(tm.length-1,1)!="/") tm+="/";
var strtm="<img[^>]+src=[\"]?("+tm+"[^\"]+)[\"]?[^>]*>";
var re = new RegExp(strtm,"ig");
str = str.replace(re,"\n\n");
}
else
{
if(set.stext.checked) str = str.replace(/[^<]*<([^>]*?)>[^<]*/ig,"<$1>");
if(!set.linka.checked) str = str.replace(/<a[^>]+href=[" ]?([^"]+)[" ]?[^>]*>(.*?)<\/a>/ig,"$2");
if(!set.font_color.checked&&!set.stext.checked)
str = str.replace(/<font([^>]+)color=([^ >]+)([^>]*)>(.*?)<\/font>/ig,"<font$1$3>$4</font>");
if(!set.font_size.checked&&!set.stext.checked)
str = str.replace(/<font([^>]+)size=([^ >]+)([^>]*)>(.*?)<\/font>/ig,"[size=$2]<font$1$3>$4</font>");
if(!set.font_face.checked&&!set.stext.checked)
str = str.replace(/<font[^>]+face=([^ >]+)[^>]*>(.*?)<\/font>/ig,"$2");
if(!set.img.checked) str = str.replace(/<img[^>]+src=[" ]?([^"]+)[" ]?[^>]*>/ig,"\n\n");
if(!set.odj.checked){
//return str;
str = str.replace(/<object[^>]*?6BF52A52\-394A\-11d3\-B153\-00C04F79FAA6[^>]*?>.*<param[^>]+name\s*=\s*["](url|src)["][^>]+value=[" ]?([^"]+)[" ][^>]*>.*<\/object>/ig,"\n[wmv]$2[/wmv]\n");
str = str.replace(/<object[^>]*?D27CDB6E\-AE6D\-11cf\-96B8\-444553540000[^>]*?>.*<param[^>]+name\s*=\s*["](url|src)["][^>]+value=[" ]?([^"]+)[" ][^>]*>.*<\/object>/ig,"\n Flash: http://$2 \n");
str = str.replace(/<embed[^>]*type=["]?application\/x\-shockwave\-flash["]?[^>]*src=[" ]?([^"|^ ]+)[" ]?[^>]*>/ig,"\n Flash: http://$1 \n");
str = str.replace(/<embed[^>]*src=["]?([^"|^ ]+)["]?[^>]*type=["]?application\/x\-shockwave\-flash["]?[^>]*>/ig,"\n Flash: http://$1 \n");
str = str.replace(/<object[^>]*?CFCDAA03\-8BE4\-11cf\-B84B\-0020AFBBCCFA[^>]*?>.*<param[^>]+name\s*=\s*["](url|src)["][^>]+value=[" ]?([^"]+)[" ][^>]*>.*<\/object>/ig,"\n[rm]$2[/rm]\n");
}
if(!set.font_b.checked&&!set.stext.checked){
str = str.replace(/<([\/]?)b>/ig,"[$1b]");
str = str.replace(/<([\/]?)strong>/ig,"[$1b]");}
if(!set.font_u.checked&&!set.stext.checked)
str = str.replace(/<([\/]?)u>/ig,"[$1u]");
if(!set.font_i.checked&&!set.stext.checked)
str = str.replace(/<([\/]?)i>/ig,"[$1i]");
str = str.replace(/ /g," ");
str = str.replace(/&/g,"&");
str = str.replace(/"/g,"\"");
str = str.replace(/</g,"<");
str = str.replace(/>/g,">");
}
str = str.replace(/<br>/ig,"\n");
str = str.replace(/<p[^>]*?>/ig,"\n\n");
str = str.replace(/<[^>]*?>/g,"");
str = str.replace(/\[url=([^\]]+)\]\n(\[img\]\1\[\/img\])\n\[\/url\]/g,"$2");
str = str.replace(/\n+/g,"\n");
return str;
}
function copycode(obj){
obj.select();
objcopy=obj.createTextRange();
objcopy.execCommand("Copy");
}
function trans(){
var str = "";
rtf.focus();
rtf.document.body.innerHTML = "";
rtf.document.execCommand("paste");
str = rtf.document.body.innerHTML;
if(str.length == 0) {
alert("剪贴版不存在超文本数据!");
return "";
}
return html_trans(str);
}
function preview(){
var prewin=window.open("","","");
prewin.document.write(rtf.document.body.innerHTML);
}
function zhen(str)
{
strfound=str.replace(/\\/ig,"\\\\");
strfound=strfound.replace(/\[/ig,"\\[");
strfound=strfound.replace(/\]/ig,"\\]");
strfound=strfound.replace(/\{/ig,"\\{");
strfound=strfound.replace(/\}/ig,"\\}");
strfound=strfound.replace(/\|/ig,"\\|");
strfound=strfound.replace(/\//ig,"\\/");
strfound=strfound.replace(/\^/ig,"\\^");
strfound=strfound.replace(/\./ig,"\\.");
strfound=strfound.replace(/\*/ig,"\\*");
strfound=strfound.replace(/\?/ig,"\\?");
strfound=strfound.replace(/\+/ig,"\\+");
return strfound;
}
function replace_star()
{
var str=document.getElementById('text').value;
if(!reg.checked)
strfound=zhen(find_text.value);
else
strfound=find_text.value;
var re = new RegExp(strfound,"ig");
str=str.replace(re,replace_text.value);
document.getElementById('text').value=str;
}
</SCRIPT>
</head>
<body background="images/bj.gif" topmargin="0" leftmargin="0" marginwidth="0">
<div class="maintable">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="740" id="table1">
<tr>
<td>
<p align="center">
</td>
</tr>
</table>
</div>
<TABLE cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
<TBODY>
<tr>
<TD height="30" background="images/bj2.gif">
<p align="center"> <font style="font-size: 9pt" size="2"><b><font color="#000000" face="新宋体" size="2"><a href="http://www.photoskycn.com">汇精坊图像处理网</a>转贴工具</font><font color="#FF0000">-可屏蔽干扰码</font>
<A
href="#" target="_self" onclick="javascript:window.external.AddFavorite('http://www.photoskycn.com/zhuante.html', '【汇精坊图像处理网】-超级转贴工具')">
加入收藏</A></b></font></TD>
</tr>
<TR>
<TD height="2"></TD>
</TR>
<TR>
<TD align=middle bgColor=#f8f8f8>
<DIV align=center>
<textarea name="textarea" cols=100 class=textarea id=text style="WIDTH: 700px; HEIGHT: 300px" onbeforepaste="if(document.getElementById('x_paste').checked){window.clipboardData.setData('text',trans());this.focus();}" rows="1"></textarea>
<iframe id=rtf
style="WIDTH: 0px; HEIGHT: 0px" marginwidth=0 marginheight=0
src="about:blank" scrolling=no></iframe>
</DIV>
<div align="center">
<TABLE borderColor=#cccccc cellSpacing=1 width="700px"
bgColor="#B5D76B" border=0>
<TBODY>
<TR align=middle valign="middle">
<TD width="140" height="44">
<DIV align=left class="STYLE4"><INPUT style="WIDTH: 130px; HEIGHT: 40px" onClick="document.getElementById('text').value += trans();" type=button value=转换(追加) name=button>
</DIV></TD>
<TD width="130"><input name=button type=button style="WIDTH: 130px; HEIGHT: 40px" onClick="document.getElementById('text').value = trans()" value=转换(覆盖)></TD>
<TD width="141">
<P align=center class="STYLE4"><INPUT style="WIDTH: 130px; HEIGHT: 40px" onclick=copycode(window.text) type=button value=复制到剪贴板>
</P></TD>
<TD width="104">
<table width="0" border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
<INPUT onclick=preview() type=button value=" 预览帖子 " style="WIDTH: 100; HEIGHT: 22" name=preview></td>
</tr>
<tr>
<td>
<INPUT style="WIDTH: 100; HEIGHT: 21" onClick="document.getElementById('text').value=''" type=button value="清空内容"> </td>
</tr>
</table>
</TD>
<TD width="23%">
<TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
<TBODY>
<TR align=middle>
<TD class="STYLE4">
<DIV align=center><INPUT title="自动分析所有超链接,并转换成超链接格式注意:超链接必须单独在一行中!" style="WIDTH: 80px" onclick=url() type=button value=分析超链接 name=Submit>
</DIV></TD>
<TD>
<DIV align=center><INPUT title=紧凑格式,删除所有空行 style="WIDTH: 80px" onclick=delnull() type=button value=清除空行 name=Submit>
</DIV></TD></TR>
<TR align=middle>
<TD>
<DIV align=center><INPUT title=清除多余的空行,保持最一个空行 style="WIDTH: 80px" onclick=refix() type=button value=清除多余 name=Submit>
</DIV></TD>
<TD>
<DIV align=center><INPUT title=为每一行(包括空行)增加一空行 style="WIDTH: 80px" onclick=addbr() type=button value=增加空行 name=Submit>
</DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</div>
<FORM name=set>
<TABLE height=50 cellSpacing=5 cellPadding=0 width="720"
border=0>
<TBODY>
<TR>
<TD title=转换的结果中将不含有图片信息 width="13%" height=20><span class="STYLE2">
<LABEL
for=img>
<INPUT id=img type=checkbox>
屏蔽图片</LABEL>
</span></TD>
<TD title=转换的结果中将不含有链接信息 width="14%"><span class="STYLE2">
<LABEL for=linka>
<INPUT
id=linka type=checkbox>
屏蔽超链接</LABEL>
</span></TD>
<TD title=转换的结果中将不含音频、视频、FLASH等信息 width="14%"><span class="STYLE2">
<LABEL
for=odj>
<INPUT id=odj type=checkbox>
屏蔽对象</LABEL>
</span></TD>
<TD title=转换的结果中将不含文本信息,同时字体属性将被自动屏蔽 width="14%"><span class="STYLE2">
<LABEL
for=stext>
<INPUT id=stext type=checkbox>
屏蔽文字</LABEL>
</span></TD>
<TD title=为了方便帖子的阅读,强制把图片用空行隔开 width="14%"><span class="STYLE2">
<LABEL
for=filtrate>
<INPUT id=filtrate
onclick="if(this.checked)window.base_url.style.display='block';else window.base_url.style.display='none';"
type=checkbox>
启用图过滤</LABEL>
</span></TD>
<TD title=屏蔽所有定字体相关的属性 width="14%"><span class="STYLE2">
<LABEL for=font>
<INPUT
id=font
onclick=font_color.checked=this.checked;font_size.checked=this.checked;font_face.checked=this.checked;font_b.checked=this.checked;font_i.checked=this.checked;font_u.checked=this.checked;
type=checkbox>
屏蔽字属性</LABEL>
</span></TD>
<TD title=屏蔽所有定字体相关的属性 width="14%"><span class="STYLE2">
<label>
<input type="checkbox" id="fontbash" value="checkbox" checked="checked" />
<span class="STYLE1"> 屏蔽干扰码</span></label>
</span></TD>
</TR>
<TR>
<TD title=转换的结果中将不含有字体颜色信息><span class="STYLE2">
<LABEL for=font_color>
<INPUT
id=font_color type=checkbox>
屏蔽字颜色</LABEL>
</span></TD>
<TD title=转换的结果中将不含有字体尺寸信息><span class="STYLE2">
<LABEL for=font_size>
<INPUT
id=font_size type=checkbox>
屏蔽字尺寸</LABEL>
</span></TD>
<TD title=转换的结果中将不含有字体类型信息><span class="STYLE2">
<LABEL for=font_face>
<INPUT
id=font_face type=checkbox>
屏蔽字类型</LABEL>
</span></TD>
<TD title=转换的结果中将不含有粗体信息><span class="STYLE2">
<LABEL for=font_b>
<INPUT id=font_b
type=checkbox>
屏蔽粗体</LABEL>
</span></TD>
<TD title=转换的结果中将不含有斜体信息><span class="STYLE2">
<LABEL for=font_i>
<INPUT id=font_i
type=checkbox>
屏蔽斜体</LABEL>
</span></TD>
<TD title=转换的结果中将不含有下划线信息><span class="STYLE2">
<LABEL for=font_u>
<INPUT id=font_u
type=checkbox>
屏蔽下划线</LABEL>
</span></TD>
<TD title=转换的结果中将不含有下划线信息><span class="STYLE2"></span></TD>
</TR></TBODY></TABLE>
</FORM>
<TABLE borderColor=#efefef cellPadding=2 width=700
bgColor="#B5D76B" border=0>
<TBODY>
<TR>
<TD class=text11 align=middle width="82%"><SPAN
class="text9 style5"><span style="font-size: 9pt">查找文字</span></SPAN> <INPUT id=find_text size=50
name=find_text>
<INPUT onClick="set.reset();find_text.value='';replace_text.value='';window.textfield.value='';" type=button value= 恢复默认 name=Submit> </TD>
<TD class=text11 align=middle width="18%" rowSpan=2><LABEL
for=reg><INPUT id=reg type=checkbox CHECKED value=1 name=reg>
<SPAN class="text9 style5"><span style="font-size: 9pt">使用正则语法</span></SPAN></LABEL> </TD></TR>
<TR>
<TD class=text11 align=middle><SPAN
class="text9 style5"><span style="font-size: 9pt">替换文字</span></SPAN> <INPUT id=replace_text
size=50 name=replace_text>
<INPUT onclick=replace_star() type=button value= 开始替换 name=Submit></TD></TR></TBODY></TABLE><BR><BR></TD></TR>
<TR bgcolor=#f8f8f8><TD>
<table width="720" border="0" align="center" cellpadding="00" cellspacing="0">
<tr>
<td>
<p style="line-height: 150%; margin-left: 15px; margin-top:0; margin-bottom:0"><b>
<span style="font-size: 9pt">使用说明:</span></b><span style="font-size: 9pt"><br>
1.在网页中拖动鼠标选中你想要的图片或文字,然后鼠标右键“复制(C)”或按Ctrl+C。<br />
2.进入该页面,直接按下“追加转换剪贴板数据”。<br />
3.复制文本筐中的数据,按下“将代码复制到剪贴板”。<br />
4.进入论坛发贴页面,鼠标右键“粘贴(P)”或按Ctrl+V将帖子内容复制到帖子内容筐。<br>
5.乱码过滤功能只在discuz4.1和phpwind4.32下测试过部分论坛,如果不能正常使用请关掉乱码过滤。<br />
</span><span class="STYLE1"><span style="font-size: 9pt">6.对于没有开启干扰代码的论坛建议去掉屏蔽干扰码的复选框。</span></span></p>
<p style="line-height: 150%; margin-left: 15px; margin-top:0; margin-bottom:0">
<span class="STYLE1"><span style="font-size: 9pt"> <font color="#000000">7.</font></span></span><span style="font-size: 9pt">如果您觉得【汇精坊图像处理网】转帖工具非常方便、好用,请记住这个地址,并建议您将它添加到收藏夹。</span></p>
<p style="line-height: 150%; margin-left: 15px; margin-top:0; margin-bottom:0">
</p>
<p style="line-height: 150%; margin-left: 15px; margin-top:0; margin-bottom:0"><font color="#FF0000"><span style="font-size: 9pt; text-decoration: none">
</span></font>
</p>
</td>
</tr>
</table>
</TD>
</TR>
</TBODY></TABLE>
<SCRIPT>
rtf.document.designMode="On";
</SCRIPT>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="740" id="table2">
<tr>
<td>
<p align="center">
</td>
</tr>
</table>
</div>
</body>
</html> |