mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
minor tweak + now firefox unbroken...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ea20634cd7
commit
a97ac88bed
@ -5,14 +5,13 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
var requirejs_cfg = {
|
var requirejs_cfg = {
|
||||||
// NOTE: on electron v7+ the default seems to be '../', bug?
|
baseUrl:
|
||||||
//baseUrl: './',
|
// electron...
|
||||||
baseUrl: typeof(document) != 'undefined' ?
|
// NOTE: on electron v7+ the default seems to be '../', a bug?
|
||||||
|
typeof(process) != 'undefined' && 'electron' in process.versions ?
|
||||||
document.baseURI
|
document.baseURI
|
||||||
.replace(/^[a-zA-Z]+:\/\/\/?/, '')
|
.replace(/^[a-zA-Z]+:\/\/\/?/, '')
|
||||||
.split(/[#&]/)[0].split(/[\\\/]/g).slice(0, -1).join('/')
|
.split(/[#&]/)[0].split(/[\\\/]/g).slice(0, -1).join('/')
|
||||||
: typeof(process) != 'undefined' ?
|
|
||||||
process.cwd().replace(/\\/g, '/')+'/'
|
|
||||||
: './',
|
: './',
|
||||||
|
|
||||||
// XXX this does not work on direct filesystem access...
|
// XXX this does not work on direct filesystem access...
|
||||||
|
|||||||
@ -164,24 +164,21 @@ function createWindow(){
|
|||||||
// Some APIs can only be used after this event occurs.
|
// Some APIs can only be used after this event occurs.
|
||||||
app.on('ready', function(){
|
app.on('ready', function(){
|
||||||
createSplash()
|
createSplash()
|
||||||
createWindow()
|
createWindow() })
|
||||||
})
|
|
||||||
|
|
||||||
// Quit when all windows are closed.
|
// Quit when all windows are closed.
|
||||||
// On macOS it is common for applications and their menu bar
|
// On macOS it is common for applications and their menu bar
|
||||||
// to stay active until the user quits explicitly with Cmd + Q
|
// to stay active until the user quits explicitly with Cmd + Q
|
||||||
app.on('window-all-closed', function(){
|
app.on('window-all-closed', function(){
|
||||||
process.platform !== 'darwin'
|
process.platform !== 'darwin'
|
||||||
&& app.quit()
|
&& app.quit() })
|
||||||
})
|
|
||||||
|
|
||||||
// On macOS it's common to re-create a window in the app when the
|
// 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.
|
// dock icon is clicked and there are no other windows open.
|
||||||
// XXX needs testing...
|
// XXX needs testing...
|
||||||
app.on('activate', function(){
|
app.on('activate', function(){
|
||||||
win === null
|
win === null
|
||||||
&& createWindow()
|
&& createWindow() })
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user