Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Learn More

WebExtensions multiple monitor support

  • 2 одговорa
  • 1 има овај проблем
  • 1 преглед
  • Последњи одговор послао NPEFOX

more options

Using Firefox 57 Quantum I want to make extension that capable to running on multiple monitor. The idea it was so simple, if dual monitor detected, open Firefox for every monitor on full screen mode. I have do to full screen, but facing issue to open on another monitor and if possible, detect how many monitor attached.

Using browser.windows API to create another new tab, here are some snippet code : function getCurrentWindow() {

 return browser.windows.getCurrent();

}

getCurrentWindow().then((currentWindow) => {

 var updateInfo = {
   state: "fullscreen"
 };
 browser.windows.update(currentWindow.id, updateInfo);
 
 var newWindow = browser.windows.create({
   url: "http://172.20.12.211:8080/ivi",
   state: "fullscreen", 
   left: 1366
 });

});

This code above able to create a secondary tab, but quoting from this link https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create tells about :

stateOptional A windows.WindowState value. The initial state of the window. The minimized, maximized and, fullscreen states cannot be combined with left, top, width, or height.

So how I can create new window on secondary monitor on full screen mode? Is there any better approach way? Thanks

Using Firefox 57 Quantum I want to make extension that capable to running on multiple monitor. The idea it was so simple, if dual monitor detected, open Firefox for every monitor on full screen mode. I have do to full screen, but facing issue to open on another monitor and if possible, detect how many monitor attached. Using browser.windows API to create another new tab, here are some snippet code : function getCurrentWindow() { return browser.windows.getCurrent(); } getCurrentWindow().then((currentWindow) => { var updateInfo = { state: "fullscreen" }; browser.windows.update(currentWindow.id, updateInfo); var newWindow = browser.windows.create({ url: "http://172.20.12.211:8080/ivi", state: "fullscreen", left: 1366 }); }); This code above able to create a secondary tab, but quoting from this link https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create tells about : stateOptional A windows.WindowState value. The initial state of the window. The minimized, maximized and, fullscreen states cannot be combined with left, top, width, or height. So how I can create new window on secondary monitor on full screen mode? Is there any better approach way? Thanks

Сви одговори (2)

more options

hi NPEFOX, as this place is primarily intended for end user support, you'd get better help about developing an extension at the dedicated addons forum at https://discourse.mozilla.org/c/add-ons/development thank you for your understanding!

more options

hi Philipp, thanks for your suggestion. I've already post it on this link