minor tweak + now firefox unbroken...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-09-02 01:40:26 +03:00
parent ea20634cd7
commit a97ac88bed
2 changed files with 7 additions and 11 deletions

View File

@ -5,14 +5,13 @@
**********************************************************************/
var requirejs_cfg = {
// NOTE: on electron v7+ the default seems to be '../', bug?
//baseUrl: './',
baseUrl: typeof(document) != 'undefined' ?
baseUrl:
// electron...
// NOTE: on electron v7+ the default seems to be '../', a bug?
typeof(process) != 'undefined' && 'electron' in process.versions ?
document.baseURI
.replace(/^[a-zA-Z]+:\/\/\/?/, '')
.split(/[#&]/)[0].split(/[\\\/]/g).slice(0, -1).join('/')
: typeof(process) != 'undefined' ?
process.cwd().replace(/\\/g, '/')+'/'
: './',
// XXX this does not work on direct filesystem access...

View File

@ -164,24 +164,21 @@ function createWindow(){
// Some APIs can only be used after this event occurs.
app.on('ready', function(){
createSplash()
createWindow()
})
createWindow() })
// Quit when all windows are closed.
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
app.on('window-all-closed', function(){
process.platform !== 'darwin'
&& app.quit()
})
&& app.quit() })
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
// XXX needs testing...
app.on('activate', function(){
win === null
&& createWindow()
})
&& createWindow() })