I don't know if this is possible, but I figured I'd ask.
After my electron app opens a browser window and is displaying some icon in the taskbar and in its title bar for the window, can I change one or both of those icons while the browser is open? I suspect the answer is a hard no, but I thought it'd be cool if I could make it react in some way.
The search terms I came up with were mostly leading me to answers for how to change the icon before the window is open.
Yes, you can use win.setIcon('/path/to/icon.png'); to change the window icon.
setIcon Docs
Related
I am using the react-popout package, which is just a wrapper for window.open and I am trying to create popout windows in React. These windows HAVE to stay on top no matter what, but I am using Google Chrome right now so a lot of the window.open options don't work (alwaysRaised, resizable) etc. I tried looking into onBlur and focus but no concrete so far. Thank you.
I'm looking to create a "pop-up" window that simply displays text within the window without the browser's signature. When I create a window simply by using the window.open command, the Chrome symbol and address bar is displayed.
Is there a way to get rid of this?
Or is there a smarter way of doing this?
Also, with that being said, I want this window to stay on top of all other windows being displayed. That is, I want it to essentially be running on top of a window even though I may be clicking on a full screen window behind it.
No, this is intentionally made not possible (at least in Chrome) because it could be used to confuse the user to think that a browser window is a window for another program.
Google Chrome window.open height includes URL bar
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)
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.
I have an IE7 app that needs to open a popup window onto a second screen. I'm fudging this at the moment by extending the desktop and explicitly opening the window at an offset that makes it appear over on the other one. However this seems like a hack and I'd like to be able to explicitly set the window screen when I call window.open(). Is there any way to do this?
I'm pretty sure this isn't possible. I did some testing and the pop-up windows seemed to be restricted to the monitor "with focus".
Demo: jsfiddle.net/Marcel/25W29
As stated in the Title, i'm trying to figure out if it's possible in Javascript to:
Open a popup through my parent site with window.open
Have that popup display in front of the parent
Not lose keyboard focus from the parent window.
So something like the functionality of the popup notification of Windows Messenger for example
Any ideas?
Regards,
user523842 :P
Don't use window.open use instead one of many many alternatives aka overlay window/div.
You can use pure JavaScript for this:
http://library.creativecow.net/articles/chaffin_abraham/full-page-overlay.php
Or one of many jQuery solutions as well, just Google for it.
Not afaik. You can't have a focus window underneath a blurred one, but you shouldn't rely on window manipulation anyway because there's a high probability the thing will open in a tab or some other unpredictable client controlled manner. If you want JS dialogs and tight control, use lightbox techniques.