Open becomingmountains opened 1 year ago
I believe many of the "complicated" or specialized calls in the gmail.get
-namespace used for "old Gmail" is currently broken, because Gmail may no longer be using the protocol they used to determine this.
I believe the best fix for that would be to create new, corresponding implementations in the gmail.new.get
-namespace.
I went digging into this today. This breaks here:
api.helper.get.navigation_count = function(i18nName) {
const title = api.tools.i18n(i18nName);
const dom = $("div[role=navigation]").find("[title*='" + title + "']");
if (dom || dom.length > 0) {
if (dom[0].title.indexOf(title) !== -1) {
const value = parseInt(dom[0].attributes["aria-label"].value.replace(/[^0-9]/g, ""));
if (!isNaN(value)) {
return value;
}
}
}
return 0;
};
This line no longer works: $("div[role=navigation]").find("[title*='" + title + "']")
I'm happy to write open a PR sometime this week to fix this. I don't know how or where to test this. Just looking at my Gmail inbox may not be enough.
Sounds good. If you can come up with a PR which works for you, I would be willing to test it :)
@josteink great! Thank you so much. I opened a PR here: https://github.com/KartikTalwar/gmail.js/pull/776
Calling
gmail.get.unread_emails()
gives me the following error:Getting this for all
unread
functions (gmail.get.unread_draft_emails()
,gmail.get.unread_inbox_emails()
). Calling insideBrowser: Brave Browser Version 1.46.144 Chromium: 108.0.5359.128 (Official Build) unknown (64-bit) Extension Version: 3 gmail-js version: ^1.1.1