mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
made devtools startup timeout configurable...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0c85d026fa
commit
4a8539bfce
@ -32,6 +32,18 @@
|
||||
|
||||
<script>
|
||||
if(window.require){
|
||||
Object.defineProperty(window, 'STARTUP_DEVTOOLS_TIMEOUT', {
|
||||
get: function(){
|
||||
return parseInt(localStorage.STARTUP_DEVTOOLS_TIMEOUT || 5000) },
|
||||
set: function(value){
|
||||
if(value == null){
|
||||
delete localStorage.STARTUP_DEVTOOLS_TIMEOUT
|
||||
return
|
||||
}
|
||||
value = parseInt(value)
|
||||
;(value || value == 0)
|
||||
&& (localStorage.STARTUP_DEVTOOLS_TIMEOUT = value) }, })
|
||||
|
||||
window.__devtools_failsafe = setTimeout(function(){
|
||||
// nw...
|
||||
if(window.nw){
|
||||
@ -43,7 +55,7 @@ if(window.require){
|
||||
require('electron').remote.getCurrentWindow().openDevTools()
|
||||
} catch(err){ }
|
||||
}
|
||||
}, 5000)
|
||||
}, STARTUP_DEVTOOLS_TIMEOUT)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -34,6 +34,18 @@
|
||||
|
||||
<script>
|
||||
if(window.require){
|
||||
Object.defineProperty(window, 'STARTUP_DEVTOOLS_TIMEOUT', {
|
||||
get: function(){
|
||||
return parseInt(localStorage.STARTUP_DEVTOOLS_TIMEOUT || 5000) },
|
||||
set: function(value){
|
||||
if(value == null){
|
||||
delete localStorage.STARTUP_DEVTOOLS_TIMEOUT
|
||||
return
|
||||
}
|
||||
value = parseInt(value)
|
||||
;(value || value == 0)
|
||||
&& (localStorage.STARTUP_DEVTOOLS_TIMEOUT = value) }, })
|
||||
|
||||
window.__devtools_failsafe = setTimeout(function(){
|
||||
// nw...
|
||||
if(window.nw){
|
||||
@ -45,7 +57,7 @@ if(window.require){
|
||||
require('electron').remote.getCurrentWindow().openDevTools()
|
||||
} catch(err){ }
|
||||
}
|
||||
}, 5000)
|
||||
}, STARTUP_DEVTOOLS_TIMEOUT)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user