Guest User

X-notifier for Yandex.ru

a guest
Feb 21st, 2018
35,326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**********************************************************
  2. Yandex
  3. **********************************************************/
  4. var name="Yandex.ru";
  5. var ver="2018-02-21";
  6. var hostString="yandex.ru";
  7.  
  8. function init() {
  9.   this.loginData=["https://passport.yandex.ru/passport?mode=auth", "login", "passwd", "retpath="+encodeURIComponent("https://mail.yandex.ru")];
  10.   this.dataURL="https://mail.yandex.ru";
  11.   this.viewURL="https://mail.yandex.ru";
  12.   this.cookieDomain="yandex.ru";
  13. }
  14.  
  15. function getCount(aData) {
  16.   var fnd = aData.match(/"status":"ok","data":{"new":(\d+)/);
  17.   return fnd?fnd[1]:-1;
  18. }
  19. function process(aData,aHttp){
  20.   switch(this.stage){
  21.   case ST_LOGIN_RES:
  22.     this.stage=ST_DATA;
  23.   case ST_DATA:
  24.     this.getHtml(this.dataURL);
  25.     return false;
  26.   }
  27.   return this.baseProcess(aData,aHttp);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment