Paste: baidu tieba miyu for smliey2

Author: test by cat
Mode: javascript
Date: Tue, 28 May 2013 05:55:16
Plain Text |
void(function(){if(document.getElementById('#secret#')){return}var z,x={a:'1234',encrypt:function(a,b){if(a===''){return''};a=escape(a);b=escape((b===undefined)||(b==='')?this.a:b);var c='';for(var i=0;i<b.length;++i){c+=b.charCodeAt(i).toString()}var d=Math.floor(c.length/5);var e=parseInt(c.charAt(d)+c.charAt(d*2)+c.charAt(d*3)+c.charAt(d*4)+c.charAt(d*5));var f=Math.ceil(b.length/2);var g=Math.pow(2,31)-1;var h=Math.round(Math.random()*1000000000)%100000000;c+=h;while(c.length>10){c=(parseInt(c.substring(0,10))+parseInt(c.substring(10,c.length))).toString()}c=(e*c+f)%g;var j='';var k='';for(var i=0;i<a.length;++i){j=parseInt(a.charCodeAt(i)^Math.floor((c/g)*255));if(j<16){k+='0'+j.toString(16)}else k+=j.toString(16);c=(e*c+f)%g}h=h.toString(16);while(h.length<8){h='0'+h};k+=h;return k},decrypt:function(a,b){if((a==='')||(a.length<8)){return''};b=escape((b===undefined)||(b==='')?this.a:b);var c='';for(var i=0;i<b.length;++i){c+=b.charCodeAt(i).toString()}var d=Math.floor(c.length/5);var e=parseInt(c.charAt(d)+c.charAt(d*2)+c.charAt(d*3)+c.charAt(d*4)+c.charAt(d*5));var f=Math.round(b.length/2);var g=Math.pow(2,31)-1;var h=parseInt(a.substring(a.length-8,a.length),16);a=a.substring(0,a.length-8);c+=h;while(c.length>10){c=(parseInt(c.substring(0,10))+parseInt(c.substring(10,c.length))).toString()}c=(e*c+f)%g;var j="";var k="";for(var i=0;i<a.length;i+=2){j=parseInt(parseInt(a.substring(i,i+2),16)^Math.floor((c/g)*255));k+=String.fromCharCode(j);c=(e*c+f)%g}return unescape(k)}};var d=document.querySelectorAll('.d_post_content');Array.prototype.map.call(d,function(d){var p=d.parentNode,l=d.querySelectorAll('[text^=""]'),c='';if(l.length>0){for(var i=0;i<l.length;++i){c+=l[i].getAttribute('text').replace(/(.*)/i,'$1')}var d=document.createElement('pre');d.textContent=c;d.style.color='green';d.style.wordWrap='break-word';d.text=d.textContent;d.addEventListener('click',function(e){e.preventDefault();this.textContent=x.decrypt(this.text,prompt('\u8BF7\u8F93\u5165\u5BC6\u7801\uFF1A'));return false},false);p.appendChild(document.createElement('hr'));p.appendChild(d)}});var f=document.createElement('input'),s=document.querySelector('.pt_submit');f.id='#secret#';f.type='button';f.className='subbtn_bg';f.value='\u5BC6 \u8BED';f.style.marginRight='5px';f.addEventListener('click',function(){var c=document.createElement('div'),t=document.createElement('textarea'),btn=document.createElement('input'),b=document.documentElement,k=function(){var m=rich_postor._editor.getHtml(),n=x.encrypt(t.value,z).split(/(.{495})/).filter(function(v){return v.trim()}).map(function(v){return'<img width="1" height="1" class="BDE_Smiley2" src="http://1.jpg" text="'+v+'"/>'}).join(''),o=rich_postor._getData();if((o.content=m+n).replace(/[^\x00-\x7F]/g,'--').length>4824){alert('\u5B57\u6570\u8FC7\u591A\uFF01');c.parentNode.removeChild(c);return}c.parentNode.removeChild(c);PostHandler.post(rich_postor._option.url,o,function(){rich_postor.showAddResult()},function(){location.reload()})};c.style.position='fixed';c.style.marginLeft='-260px';c.style.width='520px';c.style.height='320px';c.style.left='50%';c.style.top='50px';c.style.opacity='0.9';c.style.zIndex='9999';c.style.outline=(document.body.scrollWidth-520)/2+'px solid invert';c.style.outlineOffset='0';t.style.outlineStyle='none';t.style.height='300px';t.style.width='500px';t.style.padding='5px';t.style.margin='0';t.style.boxSizing='initial';t.style.fontSize='16px';t.style.lineHeight='18px';t.style.textAlign='left';t.style.color='#111';t.style.border='5px solid #444';t.style.background='#EEE8AA';t.style.overflow='hidden';t.style.resize='none';btn.style.borderTopLeftRadius='30px';btn.style.borderTopRightRadius='30px';btn.style.width='100px';btn.style.height='20px';btn.style.fontFamily='sans-serif';btn.style.fontSize='16px';btn.style.textAlign='center';btn.style.position='absolute';btn.style.top='-24px';btn.style.color='#FAFAD2';btn.style.background='#444';btn.style.opacity='0.95';btn.addEventListener('input',function(e){z=this.value},false);t.addEventListener('keydown',function(e){switch(e.keyCode){case 9:e.preventDefault();break;case 8:var a=t.selectionStart,b=t.selectionEnd,v=t.value;if((a===b)&&(v.substring(b-4,b)==='    ')){e.preventDefault();t.value=v.substring(0,b-4)+v.substring(b,v.length);t.selectionStart=a-4;t.selectionEnd=b-4}break}return false},true);t.addEventListener('keyup',function(e){if((e.keyCode===13)&&e.ctrlKey){k()}else if(e.keyCode===9){var a=t.selectionStart,b=t.selectionEnd,x=0,y=e.shiftKey?'\t':'    ';if(a===b){t.value=v.substring(0,a)+y+v.substring(b,v.length);t.selectionStart=a+y.length;t.selectionEnd=a+y.length}else{var v=t.value;t.value=v.substring(0,a)+v.substring(a,b).split('\n').map(function(v){if(v.trim()!==''){++x;return y+v}return v}).join('\n')+v.substring(b,v.length);t.selectionStart=b+y.length*x;t.selectionEnd=b+y.length*x}}return false},false);b.appendChild(c);c.appendChild(btn);c.appendChild(t);t.focus()},false);s.insertBefore(f,s.firstChild)})();

New Annotation

Summary:
Author:
Mode:
Body: