File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
renderer-process/printing Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ const os = require('os')
8
8
const path = require ( 'path' )
9
9
10
10
const screenshot = document . getElementById ( 'screen-shot' )
11
+ const screenshotMsg = document . getElementById ( 'screenshot-path' )
11
12
12
13
screenshot . addEventListener ( 'click' , function ( event ) {
14
+ screenshotMsg . innerHTML = 'Gathering screens...'
13
15
const thumbSize = determineScreenShotSize ( )
14
16
let options = { types : [ 'screen' ] , thumbnailSize : thumbSize }
15
17
@@ -23,8 +25,8 @@ screenshot.addEventListener('click', function (event) {
23
25
fs . writeFile ( screenshotPath , source . thumbnail . toPng ( ) , function ( error ) {
24
26
if ( error ) return console . log ( error )
25
27
shell . openItem ( screenshotPath )
26
- var message = 'Wrote screenshot to: ' + screenshotPath
27
- document . getElementById ( 'screenshot-path' ) . innerHTML = message
28
+ var message = 'Saved screenshot to: ' + screenshotPath
29
+ screenshotMsg . innerHTML = message
28
30
} )
29
31
}
30
32
} )
You can’t perform that action at this time.
0 commit comments