You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
83 KiB
JavaScript
3 lines
83 KiB
JavaScript
8 years ago
|
(function(e,g){if(e.TQE)return;var w="2.3.0",r=navigator.userAgent.toLowerCase(),b=e.document,f=!!e.ActiveXObject,k=f&&!e.XMLHttpRequest,x=f&&!!b.createDocumentFragment,o=r.indexOf("webkit")>=0,n=r.indexOf("presto")>=0,m=!o&&!n&&r.indexOf("gecko")>=0,L="\u6dfb\u52a0\u94fe\u63a5",s='<option value="">\u9ed8\u8ba4</option><option value="_blank">\u65b0\u7a97\u53e3</option><option value="_self">\u5f53\u524d\u7a97\u53e3</option><option value="_parent">\u7236\u7a97\u53e3</option><option value="_top">\u9876\u5c42\u7a97\u53e3</option>',E='\u7f51\u5740:<input type="text" id="url" value="" size=45 /><br />\u6807\u9898:<input type="text" id="title" value="" size=45 /><br />\u6253\u5f00:<select id="target">'+s+"</select>",I="\u63d2\u5165\u56fe\u7247",B='\u56fe\u7247\u7f51\u5740:<input type="text" id="url" value="" size=40 /><br />\u66ff\u6362\u6587\u672c:<input name="alt" type="text" id="alt" size="20" /><br />\u5c3a\u5bf8:<input name="width" type="text" id="width" size="4" /> × <input name="height" type="text" id="height" size="4" /> px <br />\u5bf9\u9f50:<select name="align" id="align"><option value="" >\u9ed8\u8ba4</option><option value="top">\u5c45\u4e0a</option><option value="textTop">\u6587\u672c\u4e0a\u65b9</option><option value="middle">\u5c45\u4e2d</option><option value="absMiddle">\u7edd\u5bf9\u5c45\u4e2d</option><option value="baseline">\u57fa\u7ebf</option><option value="bottom">\u5e95\u90e8</option><option value="absBottom">\u7edd\u5bf9\u5e95\u90e8</option><option value="left">\u5de6</option><option value="right">\u53f3</option></select> \u8fb9\u6846:<input name="border" type="text" id="border" size="5" />',y='<form class="ePopForm">\u7f51\u5740: <input type="text" id="url" size="50"><br>\u5c3a\u5bf8: <input type="text" id="width" style="width:30px; overflow:visible;"> × <input type="text" id="height" style="width:30px; overflow:visible;">px <a href="javascript:void(0)" id="resetWH" >\u91cd\u8bbe\u5927\u5c0f</a><label><input name="lock" type="checkbox" id="lock" value="1" checked>\u9501\u5b9a\u6bd4\u4f8b</label><br>\u66ff\u6362\u6587\u672c: <input type="text" id="alt" /> \u8fb9\u6846: <input type="text" id="border" style="width:30px; overflow:visible;" /><br>\u6392\u7248: <a href="javascript:void(0)" id="alignDefault">\u9ed8\u8ba4</a> | <a href="javascript:void(0)" id="alignLeft">\u5de6\u6d6e\u52a8</a> | <a href="javascript:void(0)" id="alignC">\u5c45\u4e2d</a> | <a href="javascript:void(0)" id="alignRight">\u53f3\u6d6e\u52a8</a> | <a href="javascript:void(0)" id="alignTop">\u4e0a\u5bf9\u9f50</a> | <a href="javascript:void(0)" id="alignAbsMiddle">\u4e2d\u5bf9\u9f50</a> | <a href="javascript:void(0)" id="alignBottom">\u4e0b\u5bf9\u9f50</a><div><hr>\u94fe\u63a5: <input type="text" id="link" size="40"><select id="target">'+s+"</select></div></form>",H="\u63d2\u5165\u52a8\u753b",A='Flash\u7f51\u5740:<input type="text" id="url" value="" size=40 /><br />\u5c3a\u5bf8:<input name="width" type="text" id="width" size="4" value="200" />×<input name="height" type="text" id="height" size="4" value="200" /> px',J="\u63d2\u5165\u97f3\u9891",C='\u97f3\u9891\u7f51\u5740:<input type="text" id="url" value="" size=40 /><br />\u81ea\u52a8\u64ad\u653e:<select id="auto_start" name="auto_start"><option value="0">\u624b\u52a8\u5f00\u59cb</option><option value="1">\u81ea\u52a8\u5f00\u59cb</option></select>',K="\u63d2\u5165\u89c6\u9891",D='\u89c6\u9891\u7f51\u5740:<input type="text" id="url" value="" size=40 /><br />\u5c3a\u5bf8:<input name="width" type="text" id="width" size="4" value="320"/>×<input name="height" type="text" id="height" size="4" value="240" /> px<br />\u81ea\u52a8\u64ad\u653e:<select id="auto_start" name="auto_start"><option value="0">\u624b\u52a8\u5f00\u59cb</option><option value="1">\u81ea\u52a8\u5f00\u59cb</option></select><br />\u89c6\u9891\u7c7b\u578b:<select id="video_type" name="video_type"><option value="auto">\u81ea\u52a8\u8bc6\u522b</option><option value="flv">FLV</option><option value="rm">RMVB</option><option value="wm">\u5176\u4ed6\u89c6\u9891</option></select>',P="\u63
|
||
|
(function(a){if(!a){throw"\u5fc5\u987b\u5148\u52a0\u8f7d TQEditor.js ";return}var b=a.prototype;b.images=function(e){var d=this,c=[],g="",f=d._getDoc(),b,a;if("code"===d.currentMode())return c;b=f.getElementsByTagName("IMG");for(a=0;a<b.length;a++)c.push(e?b[a].src:b[a].getAttribute("src"));return c};b.flashs=function(){var d=this,c=[],f="",e=d._getDoc(),b,a;if("code"===d.currentMode())return c;b=e.getElementsByTagName("EMBED");for(a=0;a<b.length;a++){if(b[a].getAttribute("type").toLowerCase().indexOf("shockwave-flash")<0||b[a].getAttribute("flashvars").toLowerCase().indexOf(".flv"))continue;c.push(full_uri?b[a].src:b[a].getAttribute("src"))}return c};b.flvs=function(){var d=this,c=[],f="",e=d._getDoc(),b,a;if("code"===d.currentMode())return c;b=e.getElementsByTagName("EMBED");for(a=0;a<b.length;a++){if(b[a].getAttribute("flashvars").toLowerCase().indexOf("vcastr_file")<0)continue;/vcastr_file=([^\"& ]+)/i.exec(b[a].getAttribute("flashvars"));RegExp.$1&&c.push(RegExp.$1)}return c};b.removeLinks=function(d){var e=this,g=e._getDoc(),c,b,f;if("code"===e.currentMode())return;c=g.getElementsByTagName("A");if("function"===typeof d)for(b=c.length-1;b>=0;b--){f=d(c[b].getAttribute("href"));f&&a.removeNode(c[b],false)}else for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false);return};b.removeImages=function(d){var e=this,g=e._getDoc(),c,b,f;if("code"===e.currentMode())return;c=g.getElementsByTagName("IMG");if("function"===typeof d)for(b=c.length-1;b>=0;b--){f=d(c[b].getAttribute("src"));f&&a.removeNode(c[b],false)}else for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false);return};b.removeFlashs=function(d){var e=this,g=e._getDoc(),c,b,f;if("code"===e.currentMode())return;c=g.getElementsByTagName("EMBED");if("function"===typeof d)for(b=c.length-1;b>=0;b--){f=d(c[b].getAttribute("src"));f&&a.removeNode(c[b],false)}else for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false);return};b.removeObjects=function(){var d=this,e=d._getDoc(),c,b,f;if("code"===d.currentMode())return;c=e.getElementsByTagName("OBJECT");for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false)};b.getSelectText=function(b){var c=this,a=c.getSelectHtml();if(b)a=a.replace(/<(br|p|div|ul|ol|li|tr)[^>]*>\n?/g,"\n");return a.replace(/<(textarea|select|script|style)[^>]*>.*?<\/\1>/ig,"").replace(/<\/?[a-z][^>]*>/ig,"").replace(/\n+/g,"\n").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ")};b.getSelectHtml=function(){var d=this;if("code"==d.currentMode()){var f=d._editorObj();if(document.selection){var k=document.selection.createRange();return k.text}return f.selectionStart!=f.selectionEnd?f.value.substring(f.selectionStart,f.selectionEnd):""}if(d.activeTable){var c,b,e,g=a.CE("DIV");g.innerHTML=d.activeTable.outerHTML;c=g.firstChild;for(b=c.rows.length-1;b>=0;b--){for(e=c.rows[b].cells.length-1;e>=0;e--)if(c.rows[b].cells[e].className=="selectedTD")c.rows[b].cells[e].className="";else c.rows[b].removeChild(c.rows[b].cells[e]);c.rows[b].cells.length<1&&c.rows[b].parentNode.removeChild(c.rows[b])}return g.innerHTML}d.focus();var i=d._getRange(),j=i.htmlText;if(j)return j;else{var g=a.CE("DIV"),h=i.cloneContents().childNodes;while(h.length)g.appendChild(h[0]);return g.innerHTML}}})(window.TQE);
|
||
|
function ubb2html(g){var c=0,f=[],a=""+g,b="",e="http://www.qs.com/vt/inc/client/js/tqEditor/",d=function(a){return a.replace(/\[\]/g,function(a){return({"[":"%5b","]":"%5d"})[a]})};a=a.replace(/[<>\" ]/g,function(a){return({"<":"<",">":">",'"':"""," ":" "})[a]}).replace(/\r?\n/g,"<br>");do b="__CODE__"+Math.random()+"_";while(a.indexOf(b)>=0);a=a.replace(/\[code[=\]].*?\[\/code\]/ig,function(a){f.push(a);return b+c+++"_"}).replace(/\[flv(?:\s*=\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?)?\](.*?)\[\/flv\]/ig,function(g,b,a,c,f){if(!b)b=320;if(!a)a=240;return'<embed id="flvPlayer" src="'+e+'flvPlayer.swf" flashvars="vcastr_file='+d(f)+"&IsAutoPlay="+c+'" width="'+b+'" height="'+a+'" quality="high" bgcolor="#0E0E0E" name="play" align="middle" allowscriptaccess="sameDomain" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="opaque" />'}).replace(/\[rm(?:\s*=\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?)?\](.*?)\[\/rm\]/ig,function(f,b,a,c,e){if(!b)b=320;if(!a)a=240;return'<embed src="'+d(e)+'" width='+b+" height="+a+' autostart="'+c+'}" type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ImageWindow" ></embed>'}).replace(/\[mp3\](.*?)\[\/mp3\]/ig,'<object id="mp3Player" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-ms-wmp" width="230" height="64"><PARAM NAME="URL" VALUE="$1" /><PARAM NAME="autoStart" VALUE="0" /><PARAM NAME="invokeURLs" VALUE="false"><PARAM NAME="playCount" VALUE="100"><PARAM NAME="Volume" VALUE="100"><PARAM NAME="defaultFrame" VALUE="datawindow"></object>').replace(/\[img\](.*?)\[\/img\]/ig,"<img src=$1 />").replace(/\[img(?:=\s*(\d+)\s*,\s*(\d+)\s*)\]\s*([\w_\-\.\/:]*)\s*\[\/img\]/ig,"<img src=$3 width=$1 height=$2 />").replace(/\[(color|size)\s*=\s*([^\]]+)\s*\]/ig,"<font $1=$2>").replace(/\[\/(color|size)\]/ig,"</font>").replace(/\[bg\s*=\s*([^\]]+)\s*\]/ig,'<span style="background:$1">').replace(/\[\/bg]/ig,"</span>").replace(/\[(left|center|right)]/ig,'<div style="text-align:$1">').replace(/\[\/(left|center|right)]/ig,"</div>").replace(/(?:<br>|\s)?\[list\](.*?)(<br>|\s)*\[\/list\]/ig,function(b,a){return"<ul>"+a.replace(/\<br\>(\s| )*\[\*\]/g,"<li>")+"</ul>"}).replace(/(?:<br>|\s)?\[numlist\](.*?)(<br>|\s)*\[\/numlist\]/ig,function(b,a){return"<ol>"+a.replace(/\<br\>(\s| )*\[\*\]/g,"<li>")+"</ol>"}).replace(/\[\:(\d+)]/g,'<img src="'+e+'face/$1.gif" emot="$1" align="absMiddle" >').replace(/\[(\/?(?:b|u|i|s|sup|sub|h[1-6]))\]/ig,"<$1>").replace(/\[url\]\s*(((?!")[\s\S])*?)(?:"[\s\S]*?)?\s*\[\/url\]/ig,'<a href="$1">$1</a>').replace(/\[url\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]*?)\s*\[\/url\]/ig,'<a href="$1">$2</a>').replace(/\[email\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/email\]/ig,'<a href="mailto:$1">$1</a>').replace(/\[email\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]+?)\s*\[\/email\]/ig,'<a href="mailto:$1">$2</a>').replace(/\[qq\]\s*(\d+)\s*\[\/qq\]/ig,'<a href="tencent://message/?uin=$1">$1</a>').replace(/\[qq\s*=\s*(\d+)\s*\]\s*([\s\S]+?)\s*\[\/qq\]/ig,'<a href="tencent://message/?uin=$1">$2</a>').replace(/\[quote\]([\s\S]*?)\[\/quote\]/ig,"<blockquote>$1</blockquote>");while(/\[table\](((?!\[table)[\s\S])+?)\[\/table\]/i.test(a))a=a.replace(/\[table\](((?!\[table)[\s\S])+?)\[\/table\]/ig,function(b,a){return'<table style="border-collapse: collapse;" width=98% border="1" cellPadding="3">'+a.replace(/\[(\/?(?:tr|td|th))\]/ig,"<$1>")+"</table>"});c=-1;a=a.replace(new RegExp(b+"\\d+_","g"),function(){return f[++c]});return a}function html2ubb(h){var e=0,g=[],a=""+h,d="";do d="__CODE__"+Math.random()+"_";while(a.indexOf(d)>=0);a=a.replace(/[\r\n]/g,"").replace(/<br[^>]*>/ig,"\n");a=a.replace(/\[code[=\]].*?\[\/code\]/ig,function(a){g.push(a);return d+e+++"_"}).replace(/<embed ([^>]*)>/ig,function(h,f){var a,d,c="",e="",g="",b=f.toLowerCase();a=/width\s*=\s*\"?([^ \"]+)/i.exec(b);if(a)c="="+a[1];if(c!=""){a=/height\s*=\s*\"?([^ \"]+)/i.exec(b);if(a)e=","+a[1]}if(b.indexOf("vcastr_file")){a=/vcastr_file=([^\"&]+)/.exec(f);d=a[1];if(""!=c){a=/IsAutoPlay=(0|1)/
|