-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Question) Is there any way to perform a search from gmail.js? #800
Comments
gmail.js does not have a API for actively searching the user's Gmail contents. It has an API for obtaining information/contents of specific emails given an ID. In addition, the contents gmail.js can provide may be restricted to emails the user himself has visited (or which has been pre-cached due to the currently active view). That said, the inbox is usually loaded, and contains information about this. See the readme for available APIs, and if they don't work as expected, feel free to create a bug-report. |
Thank you for your answer @josteink! However, just to clarify, I don't want to read the contents of the emails or anything like that, I just want to perform the search action (so, basically enter "is:unread" on the search box and then press enter). I've been trying it myself with the available APIs, starting with Thanks again for your answer, though! |
In that case, do you really need an API for it? Just observe the URL bar! When I'm logged in and showing my inbox my URL is:
When I navigate to the sent items folder, my URL is:
Surely if that's all you need to do, you can interact with the web-page directly to alter the URL hash? |
You're absolutely right, I was so focused on clicking buttons and stuff that just didn't think of that, and of course
just does the trick :) Now it's just a matter of playing with URLs a bit. Thanks a lot! |
I am trying to create an extension using gmail.js (amazing project, by the way!) with a very simple aim: add a button anywhere in gmail (
add_toolbar_button
for instance is perfect) that performs a search for unread emails, so basically a search foris:unread
.I have been looking through the documentation, but haven't found a way to do so.
Is it possible to do it from gmail.js?
Thank you!
The text was updated successfully, but these errors were encountered: