Guest User

Untitled

a guest
Nov 17th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. const electron = require('electron')
  2. const { app, BrowserWindow } = require('electron')
  3.  
  4. let win
  5.  
  6. app.on('ready', () => {
  7. let displays = electron.screen.getAllDisplays()
  8. let externalDisplay = displays.find((display) => {
  9. return display.bounds.x !== 0 || display.bounds.y !== 0
  10. })
  11.  
  12. if (externalDisplay) {
  13. win = new BrowserWindow({
  14. x: externalDisplay.bounds.x + 50,
  15. y: externalDisplay.bounds.y + 50
  16. })
  17. // win.loadURL('https://github.com');
  18.  
  19. secondaryWindow = window.open("secondary.html" + (debug ? "?debug=1" : ""), 'Secondary Display', 'height='100%',width='100% ',top='0',left='0',fullscreen=1,status=0,location=0,menubar=0,toolbar=0' );
  20. }
  21. })
Add Comment
Please, Sign In to add comment