File tree 3 files changed +25
-3
lines changed
3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ require('.')({
7
7
copy : 'Configured Copy' ,
8
8
paste : 'Configured Paste' ,
9
9
save : 'Configured Save Image' ,
10
+ saveImageAs : 'Configured Save Image As…' ,
10
11
copyLink : 'Configured Copy Link' ,
11
12
inspect : 'Configured Inspect'
12
13
} ,
@@ -25,7 +26,8 @@ require('.')({
25
26
type : 'separator'
26
27
} ] ,
27
28
append : ( ) => { } ,
28
- showCopyImageAddress : true
29
+ showCopyImageAddress : true ,
30
+ showSaveImageAs : true
29
31
} ) ;
30
32
31
33
electron . app . on ( 'ready' , ( ) => {
Original file line number Diff line number Diff line change @@ -50,9 +50,21 @@ function create(win, options) {
50
50
click ( item , win ) {
51
51
download ( win , props . srcURL ) ;
52
52
}
53
- } , {
54
- type : 'separator'
55
53
} ] ;
54
+
55
+ if ( options . showSaveImageAs ) {
56
+ menuTpl . push ( {
57
+ id : 'saveImageAs' ,
58
+ label : 'Save Image As…' ,
59
+ click ( item , win ) {
60
+ download ( win , props . srcURL , { saveAs : true } ) ;
61
+ }
62
+ } ) ;
63
+ }
64
+
65
+ menuTpl . push ( {
66
+ type : 'separator'
67
+ } ) ;
56
68
}
57
69
58
70
if ( props . linkURL && props . mediaType === 'none' ) {
Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ Default: `false`
77
77
78
78
Show the ` Copy Image Address ` menu item when right-clicking on an image.
79
79
80
+ #### showSaveImageAs
81
+
82
+ Type: ` boolean ` <br >
83
+ Default: ` false `
84
+
85
+ Show the ` Save Image As… ` menu item when right-clicking on an image.
86
+
80
87
#### showInspectElement
81
88
82
89
Type: ` boolean ` <br >
@@ -99,6 +106,7 @@ labels: {
99
106
copy: ' Configured Copy' ,
100
107
paste: ' Configured Paste' ,
101
108
save: ' Configured Save Image' ,
109
+ saveImageAs: ' Configured Save Image As…'
102
110
copyLink: ' Configured Copy Link' ,
103
111
copyImageAddress: ' Configured Copy Image Address' ,
104
112
inspect: ' Configured Inspect'
You can’t perform that action at this time.
0 commit comments