@@ -16,7 +16,7 @@ const isDevelopment = process.env.NODE_ENV !== 'production';
16
16
// global window references prevent them from being garbage-collected
17
17
const _windows = { } ;
18
18
19
- const createWindow = ( { url, ...browserWindowOptions } ) => {
19
+ const createWindow = ( { search = null , url = 'index.html' , ...browserWindowOptions } ) => {
20
20
const window = new BrowserWindow ( {
21
21
useContentSize : true ,
22
22
show : false ,
@@ -48,6 +48,7 @@ const createWindow = ({url, ...browserWindowOptions}) => {
48
48
window . loadURL ( formatUrl ( {
49
49
pathname : path . join ( __dirname , url ) ,
50
50
protocol : 'file' ,
51
+ search,
51
52
slashes : true
52
53
} ) ) ;
53
54
}
@@ -60,8 +61,8 @@ const createAboutWindow = () => {
60
61
width : 400 ,
61
62
height : 400 ,
62
63
parent : _windows . main ,
63
- title : 'About Scratch Desktop ' ,
64
- url : 'index.html?route=about '
64
+ search : 'route=about ' ,
65
+ title : 'About Scratch Desktop '
65
66
} ) ;
66
67
return window ;
67
68
} ;
@@ -70,8 +71,7 @@ const createMainWindow = () => {
70
71
const window = createWindow ( {
71
72
width : defaultSize . width ,
72
73
height : defaultSize . height ,
73
- title : 'Scratch Desktop' ,
74
- url : 'index.html'
74
+ title : 'Scratch Desktop'
75
75
} ) ;
76
76
const webContents = window . webContents ;
77
77
0 commit comments