-
Notifications
You must be signed in to change notification settings - Fork 460
Open
Description
I am using gmail.js for multiple years now with our Google Workspace. It seems the function is not reliable anymore as gmail is not including a mail_id in every message div.
api.check.is_inside_email = function() {
if(api.get.current_page() !== "email" && !api.check.is_preview_pane()) {
return false;
}
var items = document.querySelectorAll(".ii.gt .a3s");
var ids = [];
for(var i=0; i<items.length; i++) {
var mail_id = items[i].getAttribute("class").split(" ")[2];
if(mail_id !== "undefined" && mail_id !== undefined) { //THIS IS SOMETIMES UNDEFINED FOR SOME MESSAGES
ids.push(items[i]);
}
}
return ids.length > 0;
};
Example of a message without a mail_id:

(Working) Example of a message with a mail_id:

Suggested Fix:
Remove the extra check for mail_id, but I guess it was added for a reason before.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels