1

I am setting up a basic Chrome extension for my team. We recently switched to an online phone system that we open through chrome. I created my extension with the purpose of keeping the application window separate from chrome so it is easier to find. But when a call/notification comes in, the windows taskbar icon for my extension doesn't have the orange glow. Can anyone help me add this code?

I am pretty inexperienced at coding so I am hoping to keep it simple if possible.

I've seen similar questions asked, but I cannot seem to get any of those examples to work for me.

Here is a screenshot example of the Hangouts chat icon notification: Icon orange notification alert

Here's my manifest.json

{
  "manifest_version": 2,

   "short_name": "Phone",
   "description": "Internet Based Phone System",
   "name": "Amazon Connect Phone",
   "version": "0.2",

   "background":{
   "scripts": ["background.js"],
   "persistent": false
   },
   "browser_action": {
     "default_icon": "icon128x128default.png",
     "default_title": "Amazon Web Services"  
   },
   "icons": {
     "16": "img/app-icon16x16.png",
     "48": "img/app-icon48x48.png",
     "128": "img/app-icon128x128.png"
   },
   "permissions": [
     "notifications", "tabs"
    ]
 }

Here's my background.js. I removed the actual url for privacy reasons.

// Called when the user clicks on the browser action.
chrome.browserAction.onClicked.addListener(function() {
   chrome.windows.create({'url': 'https://website.com', 'type': 'popup', height: 620, width:284}, function(window) {
  });
});
  • Can you show a screenshot of that glow? – wOxxOm Mar 30 '19 at 04:10
  • Hello! I attached a screenshot example – Daniel Schultz Apr 01 '19 at 15:42
  • Maybe chrome.windows.update with [drawAttention:true](https://developer.chrome.com/extensions/windows#method-update) might help. Other than that, I don't think there's any solution for extensions except for using an external utility via [nativeMessaging](https://developer.chrome.com/extensions/nativeMessaging). – wOxxOm Apr 01 '19 at 15:51
  • Ok, is the chrome.windows.update something I can add to my current background.js script or do I need to create a new script to add this? – Daniel Schultz Apr 01 '19 at 16:49
  • Yes, why? Did you try and it didn't work? – wOxxOm Apr 01 '19 at 16:50
  • Yeah, I get the error: Error in event handler: TypeError: Error in invocation of windows.update(integer windowId, object updateInfo, optional function callback): No matching signature. I've seen another question asked here: https://stackoverflow.com/questions/27520255/how-do-i-make-a-chrome-extensions-window-blink-in-the-taskbar But when I try that code, it says the windowId is not defined. I am not sure what I am missing. I really appreciate your help!! – Daniel Schultz Apr 01 '19 at 17:53
  • Simply use the proper parameters according to the documentation. – wOxxOm Apr 01 '19 at 17:57

0 Answers0