Changelog: 1.1 - Login process update 1.2 - Login process update 1.3 - Update to be compatible with X-notifier and login process update ***********************************************************/ var name="GloboMail"; var ver="2013-01-25"; var supportInboxOnly=true; var supportShowFolders=true; var supportIncludeSpam=true;
function init(){ this.initStage=ST_PRE; var ar=this.user.split("@"); this.baseURL="http://mail.mailig.ig.com.br/"; this.homeURL=this.baseURL; this.baseLoginURL="https://login.ig.com.br/signin?skin=authmail-ig"; this.loginData=[this.baseLoginURL,"login-passaporte","senha-passaporte", "botaoacessar=acessar&urlRetorno="+encodeURIComponent(this.homeURL)]; this.mailDomain="^mail.mailig.ig.com.br"; this.dataURL=this.homeURL; } function getIconURL(){ return "https://www.google.com/a/ig.com.br/images/logo.gif?alpha=1"; } function checkLogin(aData){ switch(this.stage){ case ST_CHECK: var st="ST_CHECK"; this.getHtml(this.homeURL); return false; case ST_CHECK+1: var st="ST_CHECK+1"; var fnd=aData.match(/input[\S\s]+?name="login-passaporte"/); if(!fnd){//logged in this.stage=ST_LOGIN_RES+3; return this.process(aData); }else{ this.stage=ST_LOGIN; return this.process(aData); } } this.onError(); return true; } function isLoggedIn(aData){ var reg=new RegExp("\"\\/mail(?:\\/u\\/(\\d+))?\",\\S+?,\"(\\S+?)\""); var fnd=aData.match(reg); if(fnd){ this.viewURL=this.baseURL+(fnd[1]?"u/"+fnd[1]:""); this.dataURL=this.viewURL+"?ui=2&ik="+fnd[2]+"&view=tl&start=0&num=25&rt=c&as_has=is%3Aunread&as_subset="+(this.inboxOnly?"inbox":"all")+"&search=adv"; var fnd3=aData.match(/"sx_iosc","(\S+?)"/); if(fnd3&&(fnd3[1]=="^u|"||fnd3[1]=="^t|"))this.useInboxCount=true; var fnd4=aData.match(/"ix_ioiut","(\S+?)"/); if(fnd4&&fnd4[1]=="1")this.useInboxCount=true; this.UI=2; return 1; } //basic HTML fnd=aData.match(/<base href="(\S+?)">/); if(fnd){ this.viewURL=fnd[1]; this.dataURL=fnd[1]+"?s=q&q=is%3Aunread"+(this.inboxOnly?"+in%3Ainbox":""); this.UI=0; return 1; } return -1; } function process(aData, aHttp) { switch(this.stage){ case ST_PRE: this.stage=ST_LOGIN; var st="ST_PRE"; this.getHtml(this.homeURL); // set cookie return true; case ST_LOGIN: this.stage=ST_LOGIN_RES; var st="ST_LOGIN"; this.getHtml(this.loginData[LOGIN_URL],this.loginData[LOGIN_POST]); return true; case ST_LOGIN_RES: //201 var st="ST_LOGIN_RES"; var fnd=aData.match(/(name="redir")/); if(fnd){ var fnd2=aData.match(/form\s+action="(\S+?)"/); if(fnd2)this.loginData[LOGIN_URL]=fnd2[1]; this.stage=ST_LOGIN_RES+1; this.getHtml(this.loginData[LOGIN_URL]); return true; } this.onError(); return true; case ST_LOGIN_RES+1: //202 var st="ST_LOGIN_RES+1"; var fnd=aData.match(/(name="redir")/); if(fnd){ var formURL=aData.match(/form\s+action="(\S+?)"/); var post=getForm2(aData,"redir");
if(post){ if(formURL)this.loginData[LOGIN_URL]=formURL[1]; this.stage=ST_LOGIN_RES+2; this.getHtml(this.loginData[LOGIN_URL],post); this.loginData[LOGIN_URL]=this.baseURL; } return true; } this.onError(); return true; case ST_LOGIN_RES+2: //203 var st="ST_LOGIN_RES+2"; this.stage=ST_LOGIN_RES+2; var fnd=aData.match(/["']\d+;[uU][rR][lL]\s*?=\s*?(\S+?)['"]/); if(fnd) { fnd=fnd[1].replace(/&/ig,"&"); this.getHtml(fnd); } else { this.stage=ST_LOGIN_RES+3; } return true; case ST_LOGIN_RES+3: //204 var st="ST_LOGIN_RES+3"; if(this.isLoggedIn(aData)==1)this.stage=ST_DATA; break; } return this.baseProcess(aData, aHttp); } function getCount(aData){ var fnd; if(this.UI==2){ if(this.inboxOnly)fnd=aData.match(this.useInboxCount?/"ld",\[[\S\s]*?\["\^i",(\d+)/:/"ld",\[\["\^ig?",(\d+)/); else fnd=aData.match(/\["ti",.+?,(\d+)/); if(fnd){ if(this.includeSpam){ var fnd2=aData.match(/"ld",\[\[[\S\s]+?"\^s",(\d+)/); if(fnd2){ var spam=parseInt(fnd2[1]); if(spam>0){ this.spam=spam; return parseInt(fnd[1])+this.spam; } } } return fnd[1]; }else return -1; }else{ var spam=0; if(this.includeSpam){ fnd=aData.match(/<a href="\?s=m"\s*\S+?\((\d+)\)/); if(fnd){ spam=parseInt(fnd[1]); if(spam>0)this.spam=spam; } } if(this.inboxOnly){ fnd=aData.match(/<\/h2>\s*<tr>\s*<td[\s\S]+?<a[\s\S]+?>.+?(?: \s*\(\s*(\d+)\s*\))?\s*</); return fnd?((fnd[1]?parseInt(fnd[1]):0)+spam):-1; }else{ fnd=aData.match(/nvp_bbu_go[\s\S]+?<\/td>([\s\S]+?)<\/table>/); if(fnd){ var n=0; var fnd2=fnd[1].match(/<b>(\S+)<\/b>(.+?)<b>(\d+)<\/b>(.+?)<b>(\S+)<\/b>/); if(fnd2){ if(fnd2[2].indexOf("-")!=-1)n=isNaN(parseInt(fnd2[5]))?200:fnd2[5]; else if(fnd2[4].indexOf("-")!=-1)n=isNaN(parseInt(fnd2[1]))?200:fnd2[1]; } return parseInt(n)+spam; }else return -1; } } } function getViewURL(aFolder){ if(aFolder){ if(aFolder=="Spam"){ if(this.UI==2)return this.viewURL+"#spam"; else return this.viewURL+"?s=m"; } if(this.UI==2)return this.viewURL+"#label/"+encodeURIComponent(aFolder); else return this.viewURL+"?s=l&l="+encodeURIComponent(aFolder); } return this.viewURL; } function getData(aData){ var obj={}; if(!this.showFolders)return obj; var ar=[]; var fnd; if(this.UI==2){ fnd=aData.match(/\["ld"\s*,\s*\[(?:,?\[.+?\]\n)+\]\n,\[((?:,?\[.+?\]\n)+)\]\n/); if(fnd){ var re=/\[\"(.+)\"\s*,\s*(\d+)/g; var o; while ((o = re.exec(fnd[1])) != null){ if(parseInt(o[2])>0){ ar.push(o[1]); ar.push(o[2]); } } } }else{ fnd=aData.match(/<td class="?lb"?>([\s\S]+?)<a class="ml"/); if(fnd){ var re=/<a href="(\S+?)">\s*<font[\s\S]+?>(.+?)(?: \s*\(\s*(\d+)\s*\))?\s*</g; var o; while ((o = re.exec(fnd[1])) != null){ if(parseInt(o[3])>0){ ar.push(o[2]); ar.push(o[3]); } } } } if(this.spam!=null){ ar.push("Spam"); ar.push(this.spam); delete this.spam; } if(ar)obj.folders=ar; return obj; } function getForm2(data,name){ var st="getForm2"; if(name){ var reg=new RegExp("<form.+?name\\s*=\\s*[\"\']"+name+"[\"\']([\\S\\s]+?)<\/form>","i"); var s=data.match(reg); if(!s)return ""; data=s[1]; } var re=/<textarea.+?name\s*=\s*['"](\S+?)['"].*?>([\s\S]+?)<\/textarea>/ig; var o; var post=""; while ((o = re.exec(data)) != null){ if(post)post+="&"; o[2]=o[2].replace(/&/ig,"&"); post+=o[1]+"="+encodeURIComponent(o[2]); } return post; }
I have a problem with the t-online scripts. It appears to me to be any new mail. Loud pop is not checked t-online. The sign above the button works, however.
hello, I use X-notifier (ex WebMail Notifier) with Mozilla Firefox, for many years. A few days ago I can no longer access "alice.it." I downloaded the latest version of X-notifier (v3.3.3) but it did not work with the old script for alice (Jan 2012). Then I also downloaded the latest script for "alice.it" (posted here in May, 2013) that you have modified to make it work with Forefox and Chrome. But it still does not work on Firefox. If I try to connect with Alice, the first page that appears on the screen is this: http://www.telecomitalia.it/?ref=1 and then you see this: http://mail.alice.it/ to insert nickname and password But, this way I just do a manual login to the account of alice.it Maurizio