now devtools will not launch by default, but will launch if something goes wrong during loading...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-05-05 02:25:44 +03:00
parent 5a58a780cf
commit 6a31b48a96
3 changed files with 26 additions and 1 deletions

View File

@ -118,6 +118,9 @@ core.ImageGridFeatures.Feature('viewer-testing', [
// XXX not yet fully tested... // XXX not yet fully tested...
'system-journal', 'system-journal',
'fail-safe-devtools',
]) ])
/* /*

View File

@ -1742,6 +1742,26 @@ module.IndirectControl = core.ImageGridFeatures.Feature({
/*********************************************************************/
var FailsafeDevTools =
module.FailsafeDevTools = core.ImageGridFeatures.Feature({
title: '',
doc: '',
tag: 'fail-safe-devtools',
priority: 'low',
handlers: [
['start',
function(){
window.__devtools_failsafe && clearTimeout(window.__devtools_failsafe) }],
],
})
/*********************************************************************/ /*********************************************************************/
// XXX experimental... // XXX experimental...

View File

@ -233,7 +233,9 @@ body {
</style> </style>
<script> <script>
typeof(require) != 'undefined' && require('nw.gui').Window.get().showDevTools() window.__devtools_failsafe = setTimeout(function(){
typeof(require) != 'undefined' && nw.Window.get().showDevTools()
}, 1000)
</script> </script>