Giter Club home page Giter Club logo

Comments (2)

KartikTalwar avatar KartikTalwar commented on August 13, 2024

hey @itsazzad would it be possible to get the steps you are following to reproduce it? When I try it on my browser, it works fine.

from gmail-chrome-extension-boilerplate.

itsazzad avatar itsazzad commented on August 13, 2024

Here is the code I use. The point is that it works always except in a very few random occasions. I am not sure about the occasion. Do you have any idea that how can it can get the email address but not starting the observers? Here it will get the email address and if it not match then will alert me and after that always should have starting the observers like as refresh or http_event but seldom its not either starting the observers because I am not getting anything in the log...

var main = function() {
  gmail = new Gmail();
  console.log('Hello,', gmail.get.user_email());
  var acceptable_emails = [ "[email protected]", "[email protected]" ];
  if (jQuery.inArray(gmail.get.user_email(), acceptable_emails) >= 0) {
  } else {
    alert('Sorry! Your email is not associated with this system.');
    return false;
  }

  gmail.observe.on("refresh", function(url, body, data, xhr) {
    console.log("gmail.observe.on:refresh- url:", url, 'body', body, 'data', data, 'xhr', xhr);
  });

  gmail.observe.on("http_event", function(params) {
    console.log("gmail.observe.on:http_event- url data:", params);
  });
}
refresh(main);

from gmail-chrome-extension-boilerplate.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.