How to Block Image Loading in GMAILS Chrome Extension?

In my simple gmail chrome extension – I want to prevent loading of image in a sent mail.

Inside chrome.webRequest.onBeforeRequest.addListener is working when I include

urls: [ "*://**" ]

in the urls array. But this will fire for all the images I only want to fire for this pattern "*://*/#https://mysite/*",

But it is not firing at all – If I include googleusercontent url it is working with details.url in this format –*


"permissions": [

and in the background script

        function(details) {
        }, {
        urls: [
       }, ['blocking']

I think issue is with patter matching but I am not able to understand which is the right pattern to use

window.GLOBALS[17] is null in the new Gmail UI while it is present for the old Gmail UI

I have a Chrome extension which uses a library called gmail.js which is sort of dependent on the window.GLOBALS[17] object from the Gmail window however in the new UI of gmail, Gmail seems to have removed the GLOBALS[17] which is equal to null now, Now I have no way to access the data that was present inside the GLOBALS[17] object, I have searched, looked and tried everything but do not seem to have an alternative to GLOBALS[17] object

The GLOBALS[17] is still available on the old Gmail UI

When seen in old Gmail UI

And is null in new Gmail UI

Wheen seen from new Gmail UI

Without this I cannot know vital information like whether the email is in conversation view and so on

Why was this removed? Is there an alternative?

How to programmatically detect new Gmail UI?

Google released new UI for Gmail which can be activated from ‘Settings’ -> ‘Try the new Gmail’.

The question: is there a way to programmatically check that new Gmail UI is activated in a web browser from Chrome extension?

Gmail Chrome extensions: get PDF with email body

I have build a chrome extension that sends the attachments of an email to a web service.

I use the gmail-js module to access the email information and the binaries of the attachments.

Now I have to get a PDF with the full conversation and send to another web service.

How can I get the binary of the print version of the full email threads with this module (or another)?

InboxSDK – make sidebarContentPanel collapsed after it’s added to threadView

I’m using InboxSDK to add sidebar to thread view on GMail.

I do it like this:

InboxSDK.load(2, 'MY_KEY').then(sdk => {
    sdk.Conversations.registerThreadViewHandler(threadView => {
        const el = document.createElement("div"); = 'mySidebar';
        ReactDOM.render(, el);

            title: 'Sidebar Example',

But I couldn’t find any setting in InboxSDK docs that would enable me to show this panel as collapsed after it’s created. Is it possible, or should I do it the dirty way, by adding/removing classes from elements manually?

Get All attachments of gmail compose box using inboxsdk

I am creating a chrome addon for Gmail email tracker. For which I am using InboxSDK, I want to get all attachments from current Gmail compose body and I am using the following code.

    onClick: function (event) {
       var cv = event.composeView;
       var mail_body = cv.getHTMLContent();

As I am new to Chrome addon development as well as InboxSDK, I don’t know how to get attachments from mail_body. Please, can anyone help me?

Thanks in advance.

How to query how many gmail accounts are logged in?

For a webExtension I’m trying to check the gmail inboxes by sending a xmlhttprequest to:

… and so on for each account. I want to do this for all currently logged in accounts, but I dont know how to find out that number.

Of course, there is a dumb way, in that I just keep incrementing the u/#/ until I loop back to /u/0/, and do a check there.

But that is slow, since I’d then have to wait for the async to return, hopfully there will be a better way.

Accessing Gmail mail data/getting Oauth tokens via Chrome Extension

I’m curious as to the possibilities of accessing Gmail mail data via oauth tokens, via Chrome Extension install. I know that web apps can access mail data for processing at any time, yet I am trying to make sure if you’re able to secure Oauth mail access via chrome extension, that you could process that account at any time, not just when the user is using chrome, and not just during usage of the extension.

i.e. a Gmail extension that can analyze data in a user’s mailbox, not just triggered by user action. Looking for similar functionality to a Gmail Mail API Web Application where you have access to mailbox on an ongoing basis. Can this be acquired via Chrome Extension installation?

How to make a gmail app to scan words and trigger a popup reminder before sending an email?

I want to write a gmail extension that once the user clicks “send”, it scans the email for unclear language and provides a popup of suggestions to make the email more clear before verifying they want to send it as is.

A similar feature is when gmail provides a popup suggestion reminding you to include an attachment after a user hits “send” because it sees that there is no attachment, even though it was referred to in the email body text.

Can this be done as a gmail plugin (gadget) or rather as an extension for Chrome (and/or Firefox)? Which is the right API to use here? I am wanting to build a prototype for a school project and would appreciate any advice. Thank you!