Is there a clean way to get the current Gmail message ID? - google-chrome-extension

I am writing a Chrome extension and I would like to be able to get the current Gmail message ID (in either conversation view or not). I tried using the Gmail.js library but as mentioned here the observers quit firing after a while:
https://github.com/KartikTalwar/gmail.js/issues/304?_pjax=%23js-repo-pjax-container
So is there a different solution? I have searched around and do not see a clean, reliable solution.
Thanks for any tips or pointers.

Related

Integration : Chrome web store and slack

I was searching for a way to get some information from chrome webstore (I have couple of extensions there) specifically feedbacks from users and user count. And I would like to do something with that data.
I searched about chrome web store API
but couldn't find anything.
found launchkit which does same thing, but for appStore
I am thinking there is no straight way to do it, but if anyone has done it or got some idea about it please share it along,
Thanks in advance
A simple google tells me there are already some possible helpful answers:
Get user feedbacks
How to get user feedback/bug reports on a Chrome Extension through itself?
Get user count
API call for user count in Chrome Web Store?
The closest I can find out is chromebeat and my extensions I would have to figure out how this works without an existing API and write my own after that I guess.

How to automatically set gmail filter via chrome extension?

I would like to implement the following use case as a Chrome extension:
user visits gmail
exension checks current email body for a keyword
if a keyword is present, a gmail filter is added and saved (adding label, archiving, the details are not important here)
The first part sounds easier: there is gmail API to work with and even a gmail.js project that should make it easier.
Adding filter seems to be much harder. There is email settings API doing precisely what I want but I am fairly sure it is usable only by business accounts (custom email domains, won't work for gmail.com). I want the solution to be more universal.
One thing I thought of was to use browser automation - upon seeing the trigger keyword, the script automatically clicks 'Add filter' link, waits for AJAX, sets filter parameters and confirms.
An example of simulated user activity is in this answer
This could happen either on gmail page behind the popup ('Please wait, adjusting filters') or in background tab to keep it from interfering with user's flow. This seems like ugly workaround for me, though.
Is there a more straightforward or simply better approach that I'm missing?
After more experimentation and reviving an older github project I found out that setting the filter for a logged in user can be achieved simply by issuing a specific POST message to gmail from the current session.
I don't fully understand the parameters used in this request (if anyone has better information, please share), but I found a sample code which was greatly helpful.
Second issue, widely discussed in gmail.js community, is that Gmail security policies will prevent you from injecting your own scripts. This is bypassed by method shown in this boilerplate project
I compiled these solutions to solve my particular use case. Here is an example project with my solution, which should work out of the box - and when in doubt, see readme.

MailCore2 on Apple Watch

I have created an app for the iPhone and iPad less than a month ago that uses MailCore2 to send emails without the use of a dialog box (like the one MFMailComposeViewController uses).
The app works great and based on reviews, the implementation of MailCore2 provides a sense of security to users when sending messages.
I am in the middle of creating the same app on the Apple Watch itself, and was wondering if implementation of MailCore2 was possible on this device. If so, can a link be attached so I could see how to implement this into my project? If this can't be implemented, are there other third party solutions for sending emails without a dialog box on the Apple Watch?
Thanks in advance to all who answer.
I haven't checked in a while but I was under the impression that no code actually gets executed on the Watch. You do all processing on the device and then send your results to the Watch via an extension (like the Today extensions in notification centre). The Watch only stores the UI and doesn't execute any code. In this case, as everything would still be done on the phone, I don't see why MailCore wouldn't work or would work differently.
Maybe they've changed the SDK since I last looked though and code is now executable on the Watch?

Email Notifications Chrome Webstore Support

Is it possible to receive email notification for new comments on the Support page of a Chrome extension in the webstore?
On the support page of a Chrome extension I can add a new question, suggestion or bug report but I don't receive any notification about responses.
I had the same problem. I have several apps in the Chrome Web Store and I found it tedious to be constantly checking. I found an extension that claimed to have this functionality, though I found it periodically lost my list of extensions and wasn't able to actually fetch reviews consistently. You can try the extension here: https://chrome.google.com/webstore/detail/my-extensions/igejgfmbjjjjplnnlgnbejpkpdajkblm?hl=en. It is also open source, so it could be improved.
I ended up writing some of my own scripts to periodically check and send me an email when there is a new review or support request. I made it available to use as a hosted service (currently free, though I plan on asking for a little money to defray the hosting costs as well as some coffee money). Check out the hosted service at https://www.chromebeat.com. It has a full list of the Chrome webstore apps and extensions and can send you notifications on a new support issue or review. Right now it only checks hourly and sends on the hour.
Also, when you respond to a support request, the user who reported it doesn't get any kind of notification. The best way around that I've found is to actually message that person's Google+ profile, either by adding them to a circle (e.g. App users) posting publicly and mentioning them in the post, or for some users it's possible to message directly with hangouts.
[update: Oct 2015. It's now possible to "Reply" to reviews in the web store, so that's probably the best way to respond to user reviews directly]
As far as I know, there is no such option. You will have to periodically check it.
Which makes using the built-in Feedback quite useless - you're better off using something like a public bug tracker as your "Support" link and disabling Feedback.
Existing feature request: https://code.google.com/p/chromium/issues/detail?id=295837
As of 2015-03-23, it is untriaged.
No, that has not been implemented, even approaching a decade later.
New Solution:
The two options in the current answer are no longer working, so I made a small utility app to solve this problem.
You can submit your extension's id and your email address and Webstore Watch will notify you within 1 minute of a new support request.
https://gmanicus.github.io/WebstoreWatch/
Let me know if this goes down or if you experience problems. I can't guarantee 100% reliability, but I will do my best to maintain it.

displaying prompt box from plugin

I have a plugin that i would like to show a pop up where a user can enter some text, which when completed the plugin can use. Is such a thing possible or are prompts only available using javascript?
Thanks
This isn't possible. You can pass a message from a plugin to a user by throwing an exception, the user will get the exception message but they wont be able to reply.
I would suggest a dialog using custom workflow activities.
Can't be done the way you think. That's because the plugin is run directly on the server. However, you've got two options.
If it's for debug, you can use a tracer and write to it. The downside is that you need to crash the plugin to deliver the message to the GUI. Hardly recommendable for a common user.
If you absolutely must (and I know you don't must that much), you could invoke a web service from the plugin. If the web service gets to communicate with the desktop somehow, you'll be able to start desktop-ish application and show the message box from there.
What would you like to achieve by the message box, by the way? Plugins are meant to handle the internal logic on the server so there might be a better approach to what you had in mind.

Resources