5

I need to have panel behavior in chrome: something always on top but that does not impair the navigation (in any other way than masking a few pixels).

We have two options at the moment:

  • window in panel mode: not available yet (although it is available now to the GTalk extension).

  • window in popup mode: I can make it be always on top by refocusing at every event, however the focus will get targeted at my window (and impair the navigation)

I'm looking for either:

  • GTalk's dark magic

  • A way to make a popup window stay on top (or come on top and relinquish the focus to the second topmost window)

BenoitParis
  • 3,166
  • 4
  • 29
  • 56
  • I too need this source. You can install and debug the extension but the JS is rather obfuscated. https://chrome.google.com/webstore/detail/nfcpfhebbbidgaeljpngbcpkgbdjpgai – mcqwerty Mar 20 '12 at 19:56
  • @mcqwerty Well, I did some reverse engineering (unzip, jsbeautifier.org the js, load as unpackaged extension, set breakpoints around window creation)... And they use "type": "panel", but I just don't know how they get it to work. Maybe they hard-coded something in Chrome to let them have features in advance. We mortals will have to wait. – BenoitParis Mar 21 '12 at 13:02
  • I don't think you can accomplish what you want. I tried the extension you mention and the focus doesn't remain in the main window. Why do you think gtalk has accomplished that? Can you be more specific? – Ernest Mar 28 '12 at 17:24
  • @Ernest Gtalk relinquishes focus while still remaining on top of all other windows. That's what we're trying to reproduce. BenoitParis is pointing out that one can bring the window to the top by repeatedly stealing focus back, but that obviously is a cure worse than the disease. Thanks! – mcqwerty Mar 28 '12 at 19:26
  • Maybe the desktop notification api is something for you http://code.google.com/chrome/extensions/notifications.html – Oliver Jun 07 '12 at 03:04
  • "window in popup mode: I can make it be always on top by refocusing at every event, however the focus will get targeted at my window (and impair the navigation)" - If I understood you correctly, then no, you can't. Due to security reasons popup windows in Chrome can't be focused with window.focus() function. – Dmitriy Jul 12 '12 at 13:23

1 Answers1

9

I found how GTalk is the only extension with panels. You can have panels too in your own extension, using really dark magic:

In your manifest.json, add the key-value pair:

"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsDApubb73tPfYlNIFxDu3K3/EHgV6/YOJXJkld1OZ20jW/cOht1j0NggnXhQYuu1mXFUufud4I2N7b5ydyg09gcM9Va3Zk17RhNV9smbPHOd4XlzJeXifX/9MgHPu4FzCen3CiSXsOeAELJIXEuT28xICriuUko/rNPwGeIB9VwIDAQAB"

And BOOM, panels activated!

This is Google's way of activating a hidden feature. The documentation tells us "key"'s purpose is to provide a unique identifier but that we don't really need it. As demonstrated, it also activates hidden features.

Also, you cannot have two extensions with the same "key" value (GTalk gets uninstalled). And I think your extension might not make it to the chrome store.

If you know someone at Google, please tell them we mortals would really really love to have panels too. Panels are awesome. And they are the only way to display information on top of a web page while still interacting with it. Google should share the love, we really need panels.

BenoitParis
  • 3,166
  • 4
  • 29
  • 56
  • Great find. I was trying to figure this out today. – Taylor Hakes Aug 24 '12 at 23:33
  • @Segev Well, obviously not, since that key corresponds to an ID, and there is already an extension with that ID in the Store. Technically, you need the _private_ key that was used to create this _public_ key if you want to upload an extension with a pre-set ID. – Xan May 03 '15 at 14:18