Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/local/webmail2/plugins/html_mail/htmlarea/plugins/CharCounter/ drwxr-xr-x | |
| Viewing file: Select action/file-type: function CharCounter(_1){
this.editor=_1;
this._Chars=0;
this._Words=0;
this._HTML=0;
this.maxHTML=1024;
this.onKeyPress=this.__onKeyPress;
}
HTMLArea.Config.prototype.CharCounter={"showChar":true,"showWord":true,"showHtml":true,"separator":" | "};
CharCounter._pluginInfo={name:"CharCounter",version:"1.3",developer:"Udo Schmal",developer_url:"http://www.schaffrath-neuemedien.de",sponsor:"L.N.Schaffrath NeueMedien",sponsor_url:"http://www.schaffrath-neuemedien.de",c_owner:"Udo Schmal & L.N.Schaffrath NeueMedien",license:"htmlArea"};
CharCounter.prototype._lc=function(_2){
return HTMLArea._lc(_2,"CharCounter");
};
CharCounter.prototype.onGenerate=function(){
var _3=this;
if(this.charCount==null){
var _4=document.createElement("span");
_4.style.padding="2px 5px";
if(HTMLArea.is_ie){
_4.style.styleFloat="right";
}else{
_4.style.cssFloat="right";
}
var _5=document.createElement("div");
_5.style.height=_5.style.width=_5.style.lineHeight=_5.style.fontSize="1px";
_5.style.clear="both";
if(HTMLArea.is_ie){
this.editor._statusBarTree.style.styleFloat="left";
}else{
this.editor._statusBarTree.style.cssFloat="left";
}
this.editor._statusBar.appendChild(_4);
this.editor._statusBar.appendChild(_5);
this.charCount=_4;
}
};
CharCounter.prototype.__onKeyPress=function(ev){
if((ev.keyCode!=8)&&(ev.keyCode!=46)){
if(this.maxHTML!=-1){
var _7=this.editor.getHTML();
if(_7.length>=this.maxHTML){
HTMLArea._stopEvent(ev);
return true;
}
}
}
};
CharCounter.prototype._updateCharCount=function(){
var _8=this.editor;
var _9=_8.config;
var _a=_8.getHTML();
var _b=new Array();
if(_9.CharCounter.showHtml){
_b[_b.length]=this._lc("HTML")+": "+_a.length;
}
this._HTML=_a.length;
if(_9.CharCounter.showWord||_9.CharCounter.showChar){
_a=_a.replace(/<\/?\s*!--[^-->]*-->/gi,"");
_a=_a.replace(/<(.+?)>/g,"");
_a=_a.replace(/ /gi," ");
_a=_a.replace(/([\n\r\t])/g," ");
_a=_a.replace(/( +)/g," ");
_a=_a.replace(/&(.*);/g," ");
_a=_a.replace(/^\s*|\s*$/g,"");
}
if(_9.CharCounter.showWord){
this._Words=0;
for(var x=0;x<_a.length;x++){
if(_a.charAt(x)==" "){
this._Words++;
}
}
if(this._Words>=1){
this._Words++;
}
_b[_b.length]=this._lc("Words")+": "+this._Words;
}
if(_9.CharCounter.showChar){
_b[_b.length]=this._lc("Chars")+": "+_a.length;
this._Chars=_a.length;
}
this.charCount.innerHTML=_b.join(_9.CharCounter.separator);
};
CharCounter.prototype.onUpdateToolbar=function(){
this.charCount.innerHTML=this._lc("... in progress");
if(this._timeoutID){
window.clearTimeout(this._timeoutID);
}
var e=this;
this._timeoutID=window.setTimeout(function(){
e._updateCharCount();
},1000);
};
CharCounter.prototype.onMode=function(_e){
switch(_e){
case "textmode":
this.charCount.style.display="none";
break;
case "wysiwyg":
this.charCount.style.display="";
break;
default:
alert("Mode <"+_e+"> not defined!");
return false;
}
};
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0203 ]-- |