Comments (10)
Hey @g8g3 this mostly makes sense but I'm a little confused with is_in_current_view
. Would it be possible for you to describe what this property would/should do? As in, for both cases (convo turned on and off) what does that boolean check imply?
from gmail.js.
Well I'm still thinking about something formal. I just stumbled upon that issue.
In my use case, the actions offered to a user are specific to what he can relate to.
If he sees a single email (with conversation mode off), even if it conceptually goes along with other emails, the user will interact with that email (like click buttons on it, input data, etc.). There is no way he can think of emails present in other views.
However, these "remote" emails (those that are not displayed) are actually processed by my extension and thus interfere with targeted data. This is why a clear indication of what the user can interact with is important.
So, to summarize, I'm talking about a property or a method that allows the developer to access specifically what is being displayed (as opposed to metadata, giving access to all related emails).
The thing is, we can't be based on visibility status as it's embedded in metadata and says, for example, that some non-displayed email has a visible_full
status.
So I'll try to find another reliable indication of what's really shown to the user and what's not.
from gmail.js.
I kind of discover conversation off mode.
Provided it necessarily displays only 1 email, I guess we can be based on the ID in the URL.
Hopefully that'll allow us to compare with all that's in parsed metadata and extract only what's displayed.
Edit
But anyway, you have to detect that you are not in conversation mode to perform that filtering.
from gmail.js.
@g8g3 yeah, this is really tricky. Not being able to resolve all those issues is kinda frustrating. I feel like the conversation mode setting will be in GLOBALS
, otherwise it'll work for emails with just one item (which we can currently detect) and revert back to the case mentioned in the issues above..
from gmail.js.
Hello @KartikTalwar,
I've been trying to find diff between the two modes, by using JSON.stringify()
on globals and pasting the outputs into this.
Unfortunately, no diff for GLOBALS
, neither for VIEW_DATA
.
I'll keep trying parsing stuff, or think of a viable alternative.
One of them is parsing the DOM to find out how much email elements we have. Not so viable 👎.
from gmail.js.
Note: if api.check.is_thread()
is designed to know if an entire thread is displayed (as opposed to only one of its emails), then it returns false positives when metadata contain more than one email.
If it's really just to know whether "the whole thing" (whatever the display) is a thread, my mistake. (:
from gmail.js.
I think I actually found a useful value: GLOBALS[17][5][1][57]
, which presents itself as:
["bx_vmb", "0"]
for conversation turned on ;["bx_vmb", "1"]
for conversation turned off.
I guess I couldn't find it at first because you have to reload the page after tweaking settings, in order to get GLOBALS
updated.
So, first, that has to be confirmed. Second, there's still the case when the user just switched the setting but GLOBALS
has an obsolete value.
from gmail.js.
The array with "bx_vmb"
actually seems much more random to find.
You have to search for it in GLOBALS[17][5][1]
. But it can also not exist, when convo is on.
Taken into account in #51.
from gmail.js.
I'm looking into this now.
from gmail.js.
This issue has had no activity for years. Assuming no longer a problem. Closing.
from gmail.js.
Related Issues (20)
- gmail.observe.on('view_email', () => {}) is not fired HOT 16
- Synchronous 'DOMNodeInserted' DOM Mutation Event is deprecated HOT 3
- Synchronous 'DOMSubtreeModified' DOM Mutation Event is deprecated HOT 3
- Reloading window makes the the user email undefined HOT 2
- gmail.observe.on("compose") observer returns type of "compose" when reply button is clicked HOT 6
- How to Utilize the "make_request" and "make_request_async" Methods?
- Button added to toolbar in Gmail label page shows for few seconds & gets hidden (by Gmail)
- `recipient_change` hook throws console errors when compose is closed
- Detecting attachment open from search list HOT 1
- "view_email" event fires twice HOT 1
- Gmail change for innerHTML HOT 35
- Update header before send request HOT 2
- Error in the function: gmail.tools.add_compose_button HOT 7
- Error in the function compose.body() HOT 3
- Nonstop requests sent to play.google.com HOT 1
- api.get.user_email does not work with non-workspace email addresses
- GmailJS library (1.1.14) is failing to load (with error in console) HOT 1
- GmailJS method add_toolbar_button is not working HOT 3
- why this project can not be used at the server side with node? HOT 1
- Detect dark mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmail.js.