Email-Intelligence
Email-Intelligence copied to clipboard
Add compatibility for new Gmail redesign
Gmail redesign caused issues with pulling the email ID and subsequently accessing the raw email source. Location slug no longer corresponds to the email ID. The email ID or thread ID seems to be accessed by a number of other plugins from the h2[data-legacy-thread-id]
element so this update pulls from that element as it's present in both new and classic Gmail.
ServiceLink is also now inserted as an adjacent element to the span as the new redesign was repainting that element after the service link was being added.
This is awesome. I'll merge it this week! Thank you!
@nquinlan Awesome! Let me know if there are any issues or updates you want me to make to the PR.
@scottberke I had an opportunity to review this, however it looks like this may introduce a race condition where window.onpopstate
is triggered before h2[data-legacy-thread-id]
is updated, thus causing the plugin to be behind by one email if you're scrolling through emails using j
/k
or the arrow keys. Reproduced in both Gmail Classic and New. Can you fix the race condition?
@nquinlan Been on vacation for the last week. I'll look at this sometime this week and update. Thanks for the feedback!