Moving a chrome window using an extension

Currently, I am creating an exclusively internal web application for my employer, in which it is necessary to display information distributed in two browser windows (scanned document and data entry screen).

Ideally, I would like both windows to open automatically and position themselves through several user screens (all employees using this particular application have two monitors for this very purpose). Unfortunately, javascript seems unable to position a pop-up on a second monitor. I hope, however, that the chrome extension (all users are blocked from using chrome) will be able to achieve what is needed.

Before embarking on this path, is there an alternative solution to my window positioning dilemma? Can chrome extensions do more with windows than standard javascript? Or should I learn another method to achieve this result?

Thanks!

EDIT

I did a rudimentary test, and it seems to be a trick. If I had previously realized how simple chrome extensions should have been, I would have used them everywhere.

+4
source share
2 answers

You can specify the position of the window with the chrome.windows API . With appropriate left and top values, windows can be placed on a second monitor.

+3
source

We had the same difficulties. An internal webapp that opens several documents in windows and should be placed on other monitors. Javascript does not support this for security reasons, and only the native extension can work correctly with tabs / windows objects.

Thus, we created the open source chrome extension to do just that: the flexible position of the window in the settings of multiple monitors.

It has other interesting features, such as templates that you can use to share the best settings with other work colleagues.

The chrome extension is called the "MultiWindow Positioner" and its complete freedom. You can get it in the chrome store here

The actual source code that you will find on github in the chrome-multiwindow-positioner project

Disclaimer: I am the developer of the open source gitub project (MIT). If you have any interesting ideas or comments, feel free to share them here .

+2
source

Source: https://habr.com/ru/post/1494398/


All Articles