본문 바로가기

컴퓨터 팁

파이어폭스 Webmail Notifier에 파란메일 추가

일단 아래 소스를 복사해서 메모장에 붙여넣기 한 다음..
적당한 이름으로 저장하고 확장자는 js로 하면 됨
웹메일 계정에서 사용자 스크립트 클릭-추가-아까 만든 스크립트 문서 추가

/***********************************************************
Paran
***********************************************************/
function initHandler(handler) {
handler.name="Paran";
handler.hostString="paran.com";
handler.dataURL="http://mail.paran.com/";
if(handler.user){
var ar=handler.user.split("@");
handler.loginData=["http://main.paran.com/mainAction.do?method=paranMainLogin","",
"wbPasswd","wbUserid="+encodeURIComponent(ar[0])+"&wbDomain="+encodeURIComponent(ar[1])];
}
handler.mailURL="http://mail.paran.com/";

handler.process=function (aHttpChannel, aData){
switch(this.stage){
case ST_LOGIN_RES:
this.webMailNotifier.getHtml(this,"http://main.paran.com/paran/login_proc.jsp");
return false;
case (ST_LOGIN_RES+1):
this.webMailNotifier.getHtml(this,this.dataURL);
return false;
case (ST_LOGIN_RES+2):
var fnd=aData.match(/location.href=[\'\"](\S+)\/(\S+?)[\'\"]/);
if(fnd){
this.dataURL=fnd[1]+"/main/";
this.mailURL=this.dataURL;
}
this.stage=ST_DATA;
break;
}
return WebMailHandler.prototype.process.call(this,aHttpChannel, aData);
};

handler.getData=function(aData) {
var fnd=aData.match(/\uc548\uc77d\uc740 \ud3b8\uc9c0.+?(\d+)\ud1b5/); //find mail count
if(fnd) {
return fnd[1];
}else{
return -1;
}
};
}