admin管理员组文章数量:1305012
I'm currently building an exclusively internal web application for my employer, wherein there is a need to display information distributed across two browser windows (a scanned document and a data entry screen).
Ideally I would like both windows to open automatically and position themselves across the users multiple screens (all of the staff using this particular application have two monitors for this very purpose). Unfortunately, javascript seems unable to position the "pop-up" window onto a second monitor. I am hopeful however that a chrome extension (all users are locked into using chrome) might be able to achieve what is necessary.
Before I go down this path, is there an alternative solution to my window positioning dilemma? Can chrome extensions do more with windows than standard javascript alone? Or should I be exploring another method of achieving this result?
Thanks!
EDIT
I've made a rudimentary test and it certainly seems to do the trick. Had I realised earlier just how simple chrome extensions were to make I would've used them all over the place.
I'm currently building an exclusively internal web application for my employer, wherein there is a need to display information distributed across two browser windows (a scanned document and a data entry screen).
Ideally I would like both windows to open automatically and position themselves across the users multiple screens (all of the staff using this particular application have two monitors for this very purpose). Unfortunately, javascript seems unable to position the "pop-up" window onto a second monitor. I am hopeful however that a chrome extension (all users are locked into using chrome) might be able to achieve what is necessary.
Before I go down this path, is there an alternative solution to my window positioning dilemma? Can chrome extensions do more with windows than standard javascript alone? Or should I be exploring another method of achieving this result?
Thanks!
EDIT
I've made a rudimentary test and it certainly seems to do the trick. Had I realised earlier just how simple chrome extensions were to make I would've used them all over the place.
Share Improve this question edited Jul 31, 2013 at 3:54 danspants asked Jul 31, 2013 at 2:02 danspantsdanspants 3,4274 gold badges29 silver badges33 bronze badges2 Answers
Reset to default 5You can specify window position with chrome.windows API. With appropriate left
and top
values, windows can be placed on the second monitor.
We had the same type of difficulties. Internal webapp that opens multiple documents in windows, and need to be placed in other monitors. The javascript does not support this, for security reasons and only a native extension can properly work with the tabs/windows objects.
Therefore, we have created an open source chrome extension for doing exactly that: flexible windows position across multi-monitor setups.
It has other interesting features like templates that you can use to share best settings with other work collegues.
The chrome extension is called "MultiWindow Positioner" and its plete free. You can get it at the chrome store here
The actual source code you find in github in the project chrome-multiwindow-positioner
Disclaimer: I am the maintainer of the open source (MIT) github project. If there any interesting idea, or ments feel free to share them here.
本文标签: javascriptMoving chrome window using an extensionStack Overflow
版权声明:本文标题:javascript - Moving chrome window using an extension - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741797273a2398008.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论