Is there anyway that I can make Chrome Extension's window stick in window even while clicking outside of its resolution?
I'm trying to make it Sticky on the window for one simple google login so that I don't need to go back again to click extension to open it.
By using tabs API you could retrieve
windowIdof the window you want to focus on. You could do it only if needed e.g. by usingquerymethod from that API. You could passurlfor example.If you created a window that you want to be still focused then you have its id already in the hand.
After that, you could use window API
updatemethod in order to draw attention or focus. Take a look atupdateInfoparams -focusanddrawAttention.The same could be done by using
tabsAPI. You could passtabIdand the URL you want to redirect someone.Now in order to make it work you have a couple of options:
setIntervalwhich would be used to check if the tabId andwindowIdyou want are active and focus the window/tab you want in another case.setIntervalis not recommended you could use alarms. Please take a look atAlarmCreateInfo,whenparam should help you instead of triggering the alarm periodically.windowsandtabsAPI to listen on tab / window focus change. Then you will be able block the change (from user perspective) by methods I described before.You should play with all approaches and pick on that suits you, because all of them have some drawback. But don't want to make that comment very long.