How to access Gmail messages selected (checkbox) - google-apps-script

I am trying to build an Add-On for gmail which will perform some actions on a set of messages selected by the user.
Looking at the gmail Apps Script API, I cannot see a method that allows me to do that.
I've noticed that some AddOns operate on selected messages, just like what I want to do. See picture below...
The checkboxes (highlighted in green) tell the AddOn what to operate on.
What am I missing?
The opened menu has options to forward the messages selected by combining them.
Also, I noticed that this AddOn is placed by google along the top. The same happen to the boomerange AddOn. The AddOn I am developing, always appears on the right hand side (pink arrows).
How can you place your addOn along the top menu?

The items you reference with the orange arrows in the image are not Gmail Add-ons, they are actually Chrome Extensions. Chrome Extensions are installed in the browser and they can add functionality by manipulating the DOM (Document Object Model) of a webpage. The chrome extension in question is probably specifically targeting chrome tabs with Gmail loaded and injecting content in the respective pages.
If you want to learn more about developing Chrome Extensions check out the following documentation:
https://developer.chrome.com/extensions/devguide
And for developing gmail specific Chrome Extensions you might want to check out the InboxSDK framework linked below:
https://www.inboxsdk.com/

Related

Is it possible to modify the Chrome or Firefox developer tools network page?

Both Chrome and Firefox provide "Network" pages in their DevTools, which are very useful. I'm working with software which adds headers to HTTP responses to communicate performance information. I would like to be able to see this information at-a-glance in the Network panel, but looking at the relevant Chrome and MDN docs, I can't see any way to modify existing DevTools panels.
Is it possible to do this? If so, how?
Both Google Chrome and Firefox allow you to modify the shown columns and to show specific header values. It seems however that only in Chrome you can also add custom headers.
To do so, open the Network tab in the Dev Tools and make sure there is at least one entry in the list. Then right click on one of the table headers (like Name, Path, Method, etc.) to open the context menu that allows you to select which columns you want to show. From this context menu go to "Response Headers" -> "Manage Header Columns...". Then in the modal that pops up click "Add custom header..." and enter the name of the header you want to show. Click "Add" and it should now be part of the overview table.
In Firefox it works the same, but you can only select one of the predefined headers.

Google Workspace Add-On Hide or Edit App Bar Card

I developed an add-on for google workspace.
I followed the official guide for sidebar development.
Searching in the developers.google.com portal and in the Google Figma UI StyleGuide provided for the documentation of the add-on, I can't find how to change or hide the Add on top bar (not Header Card).
As you can see from the first photo attached (my add-on) I have defined the "Card Header", but it still remains the "add-on" Header Bar"(ref) that I would like to change or remove, like those of Google (attached photo) or other add-ons on the store.
Someone knows to modify it or has a reference where he explains how to do it?
Thank you so much!
Currently, the only customization that is available for the add-on header are the displayed name and the background color (fields name and layoutProperties in Common field, in your manifest).
Feature request:
If you'd like this functionality to be implemented, I'd suggest you to file a feature request on Issue Tracker, using this template.

Styling for google search app pages

I am currently working on a project and mobile design is great and works well except for when using the google search app.
I have buttons at the bottom of the page which work on all mobile browsers except on google search app. When clicking the buttons the bottom bar of the search app opens and doesn't allow click.
My answer is to move the buttons up with styling so that these will not interfere with the app but how do i apply the styling to move these specifically to the google search app app and not apply to all other mobile browsers?
can anyone help?
I would use PHP to check for the user agent. if it contains "PSA" it means it is the google search browser. you can then define an IF that will modify the CSS code in that case.

Automatically open an gmail addon card without user clicking on the addon icon

I am looking for a way (I understand does not really seem a good idea) to force my Gmail addon to automatically open a card and display the same.
Basically, the addon should check the current email's tags and then auto trigger some 'showPanel' of the addon.
I see some answers about google sheets, but not getting how to go about this in the Gmail addon without user triggering it.
Additional Chrome Extension way ??:
If this is not something possible. I also have a chrome extension (which the users will have installed) clicking on a link created by the chrome extension can I somehow trigger the addon icons click event?
Apologies if this basic stuff, not able to find any direct useful info.
There is a Chrome extension that allows you to automaticlly open an addon from Gmail, Calendar, Drive and Docs when you open the page in the browser.
https://chrome.google.com/webstore/detail/auto-open-add-on/bcjnialkobgkdkbdclhdnbdcdgdcgdlo

Google Chrome Extension Top Sites Images

So using the Google Chrome Top Sites api has values for the url and the title, but when you load the default google chrome page it also has an image of those sites, is there any way to get that sort of image for an extension? If not how does google get that image and how can you get an image of the the user's top viewed website?
Since that it isn't possible to get a screenshot of a page without loading it inside a tab, Chrome is simply getting those screenshots while you're browsing your favourite sites. You can tell this easily because sometimes sites and images do not coincide (e.g. sometimes my facebook.com top site has the image of my profile page, but links to the home).
Then, if you want your screenshots of the Top Sites, you'll have to start without screenshots, and create them while the user browses the web by using the chrome.tabs API to check when a tab loads one of the Top Sites (listening to the event onUpdated), and get a screenshot of that tab using captureVisibleTab.
NOTES: make sure that you've requested the permission for "<all_urls>" in your manifest, which is required for captureVisibleTab to work. Additionally, you may find this question and its answer helpful.
It's unfortunately not possible*. Chrome stores those thumbnails internally in URIs not accessible from an extension.
There is an existing feature request: https://code.google.com/p/chromium/issues/detail?id=11854
If you look at the comments, one of the main use cases is to access site thumbnails to replicate the New Tab page.
Do star the feature request above to raise its priority if you want this functionality implemented.
* By that I mean that it's not possilbe to access Chrome's own internal store of thumbnails.
Furthermore, as Marco suggested the way to replicate that would be tab capture, but you can't do it "in the background" for privacy reasons - a user must make an explicit gesture (e.g. click the extension's button, press a shortcut, etc.) to perform capture.
Marco's answer is valid now, captureVisibleTab should be accessible upon events. But yes, as of now Chrome forces you to have very broad permissions and maintaining your own thumbnail store.