- const left = (screen.width / 2) - (width / 2);
- const top = (screen.height * 0.3) - (height / 2);
- const opts = `width=${width},height=${height},left=${left},top=${top},menubar=no,status=no,location=no`;
+ const left = screenLeft + ((outerWidth - width) / 2);
+ const top = screenTop + ((outerHeight - height) / 2);
+ const opts = `width=${width},height=${height},left=${left},top=${top},menubar=no,status=no,location=no`;