Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #28 from jeroen1956/master
Browse files Browse the repository at this point in the history
 app_forums.js ;  aol.js ;  hotmail.js ;  gmail.js
  • Loading branch information
ewwink authored Feb 4, 2019
2 parents 9fc0fe3 + 9a3dcb6 commit d556a3c
Show file tree
Hide file tree
Showing 4 changed files with 349 additions and 312 deletions.
15 changes: 10 additions & 5 deletions components/scripts/aol.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function init(){
this.lang=this.server+"-"+this.server;
this.locale=this.server;
}
this.viewURL+="webmail-std/"+encodeURIComponent(this.lang)+"/suite";
}else{
this.lang="en-us";
this.locale="us";
Expand All @@ -31,7 +30,7 @@ function init(){
}

function getIconURL(){
return "https://s.aolcdn.com/webmail-static/webmail/180514.1519/aol/en-us/images/favicon.ico";
return "https://mail.aol.com/favicon.ico";
}

function checkLogin(aData){
Expand Down Expand Up @@ -130,7 +129,7 @@ if(this.debug)dlog(this.id+"\t"+this.user+"\t"+this.stage,aData);
else if(this.lang=="de")this.getHtml("https://mail.aol.de");
else if(this.lang=="jp")this.getHtml("https://mail.aol.jp");
else this.getHtml("https://mail.aol.com");*/
this.getHtml("https://login.aol.com/?"+"&intl="+this.locale+"&lang="+this.lang+"&src=fp-"+this.locale);
this.getHtml("https://login.aol.com/?"+"&intl="+this.locale+"&lang="+this.lang);
return false;
case ST_PRE_RES:
var form=this.getForm(aData,"login-username-form");
Expand All @@ -154,10 +153,16 @@ if(this.debug)dlog(this.id+"\t"+this.user+"\t"+this.stage,aData);
}
break;
case ST_LOGIN_RES:
var fnd=aData.match(/userId\s*=\s*"(\S+?)"/);
if(aData==null){//Firefox's tracking protection
this.getHtml("https://mail.aol.com/");
return false;
}
case ST_LOGIN_RES+1:
var fnd=aData.match(/"UserUID"\s*:\s*"(\S+?)"/);
var fnd2=aData.match(/"ViewNewOld"\s*:\s*true/);
if(fnd){
this.dataURL=["https://mail.aol.com/webmail/rpc/v1/en-us?transport=xmlhttp&user="+fnd[1]+"&a=GetMessageList",
"requests="+encodeURIComponent('[{"folder":"Inbox","start":0,"count":100,"indexStart":0,"indexMax":100,"index":true,"info":true,"rows":true,"sort":"received","tcs":false,"sortDir":"descending","search":"false","searchIn":"seen","subSearch":"","seen":[],"returnfoldername":true,"import":false,"action":"GetMessageList"}]"')+"&automatic=false"];
"requests="+encodeURIComponent('[{"folder":"'+(fnd2?'NewMail':'Inbox')+'","start":0,"count":100,"indexStart":0,"indexMax":100,"index":true,"info":true,"rows":true,"sort":"received","tcs":false,"sortDir":"descending","search":"false","searchIn":"seen","subSearch":"","seen":[],"returnfoldername":true,"import":false,"action":"GetMessageList"}]"')+"&automatic=false"];
this.stage=ST_DATA;
}else{
this.onError();
Expand Down
92 changes: 56 additions & 36 deletions components/scripts/app_forums.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,56 @@
/***********************************************************
XN-forums
@require lib-update.js
***********************************************************/
var name="XN-forums";
var defaultInterval=120;

function init(){
initUpdateHandler(this);
if(this.user=="default"){
this.noCookie=true;
}else{
this.initStage=ST_LOGIN;
this.loginData=["http://xnotifier.tobwithu.com/dp/forum?destination=forum","name","pass","op=Log+in&form_id=user_login_block"];
}

this.dataURL="http://xnotifier.tobwithu.com/dp/forum/";
this.viewURL="http://xnotifier.tobwithu.com/dp/"+(this.user=="default"?"forum/1":"tracker");
this.viewDomain="xnotifier.tobwithu.com";
this.start="<div id=\"forum\">[\\s\\S]+?<tbody>";
this.end="<\/tbody>";
}
function findString(aData){
if(this.user!="default"){
var fnd=aData.match(/<input.+?id="edit-submit".+?value="Log in"/);
if(fnd)return null;
}
var reg=new RegExp(this.start+"([\\s\\S]+?)"+this.end);
var fnd=aData.match(reg);
if(fnd){
fnd=fnd[1].replace(/<span class=\"submitted\">[\s\S]+?<\/td>/g,"");
fnd=fnd.replace(/(<td class="topics">\s*\d+)\s*<br[\s\S]+?(<\/td>)/g,"$1$2");
return fnd;
}
return null;
}
/***********************************************************
XN-forums
@require lib-update.js
***********************************************************/
var name="XN-forums";
var ver="2018-07-13";
var defaultInterval=120;

function init(){
initUpdateHandler(this);
if(this.user=="default"){
this.noCookie=true;
}else{
this.initStage=ST_PRE;
this.loginData=["http://xnotifier.tobwithu.com/dp/forum?destination=forum","name","pass","op=Log+in&form_id=user_login_block"];
}

this.dataURL="http://xnotifier.tobwithu.com/dp/forum/";
this.viewURL="http://xnotifier.tobwithu.com/dp/"+(this.user=="default"?"forum/2":"tracker");
this.viewDomain="xnotifier.tobwithu.com";
this.start="<div id=\"forum\">[\\s\\S]+?<tbody>";
this.end="<\/tbody>";
}
function process(aData,aHttp) {
if(this.debug)dlog(this.id+"\t"+this.user+"\t"+this.stage,aData);
switch(this.stage){
case ST_PRE:
this.getHtml("http://xnotifier.tobwithu.com/dp/");
return false;
case ST_PRE_RES:
var fnd=aData.match(/id="user-login-form"/);
if(fnd){
this.stage=ST_LOGIN;
var fnd2=aData.match(/"antibot".+?"key":"(\S+?)"/);
if(fnd2){
this.getHtml(this.loginData[LOGIN_URL],this.loginData[LOGIN_POST]+"&antibot_key="+encodeURIComponent(fnd2[1]));
return false;
}
}else this.stage=ST_LOGIN_RES;
}
return this.baseProcess(aData,aHttp);
}
function findString(aData){
if(this.user!="default"){
var fnd=aData.match(/<input.+?id="edit-submit".+?value="Log in"/);
if(fnd)return null;
}
var reg=new RegExp(this.start+"([\\s\\S]+?)"+this.end);
var fnd=aData.match(reg);
if(fnd){
fnd=fnd[1].replace(/<span class=\"submitted\">[\s\S]+?<\/td>/g,"");
fnd=fnd.replace(/(<td class="topics">\s*\d+)\s*<br[\s\S]+?(<\/td>)/g,"$1$2");
return fnd;
}
return null;
}
Loading

0 comments on commit d556a3c

Please sign in to comment.