You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 = [ "example1@gmail.com", "example2@gmail.com" ];
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);
view_email
,refresh
, etc are not firing occasionally if the console is not open.In that case it can get the email address here:
gmail-chrome-extension-boilerplate/main.js
Line 17 in 5c18c26
But if I refresh the page then its firing.
The text was updated successfully, but these errors were encountered: