0 Пользователей и 1 Гость просматривают эту тему.
function voidPaste(){ event.returnValue=false; document.all[\'commentsStatus\'].innerText=\'Ну тут типа вывыодится предложение подождать...\'; eOnPaste=comments.onpaste; comments.onpaste=\'\'; voidExecCommand(\'Paste\'); comments.onpaste=eOnPaste; voidCleanHTMLCode(); document.all[\'commentsStatus\'].innerText=\'\';}
function voidCleanHTMLCode(){ var obj=comments; Level=0; if(obj.childNodes)bProcessNode(obj,0);}function bProcessNode(Node,RecursNum){ if(RecursNum>100)return; var obj=Node; var i; var bWrong; var chNode; var oTextNode; if(obj.tagName){ if(obj.attributes && Level>0){ for(i=0;i if(obj.attributes(i).specified && !bInArray(obj.attributes(i).name,VALID_ATTRIBUTES)){ obj.removeAttribute(obj.attributes[i].name); } } if(obj.tagName==\'TD\' || obj.tagName==\'TH\' && obj.getAttribute(\'width\')!=null)obj.removeAttribute(\'width\'); if(obj.getAttribute(\'className\'))obj.removeAttribute(\'className\'); } if(obj.childNodes){ Level++; for(i=0;i chNode=obj.childNodes(i); bWrong=bProcessNode(chNode,RecursNum+1); if(bWrong){ sHTML=chNode.innerHTML; chNode.insertAdjacentHTML(\'beforeBegin\',sHTML); oTextNode=document.createTextNode(\'\'); chNode.replaceNode(oTextNode); } } Level--; } if(obj.tagName==\'TABLE\'){ obj.setAttribute(\'width\',\'100%\'); obj.setAttribute(\'border\',0); obj.setAttribute(\'cellSpacing\',1); obj.setAttribute(\'cellPadding\',\'4\'); obj.className=\'mainlist\'; } if(!bInArray(obj.tagName,VALID_TAGS) && Level>0)return true; return false; }}
document.all[\'commentsStatus\'].innerText=\'Ну тут типа вывыодится предложение подождать...\';
ThE0ReTiC за 11 минут до дома это круто!
Тормозишь