File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,13 @@ declare namespace contextMenu {
241
241
*/
242
242
readonly showSaveVideoAs ?: boolean ;
243
243
244
+ /**
245
+ Show the `Copy Link` menu item when right-clicking on a link.
246
+
247
+ @default true
248
+ */
249
+ readonly showCopyLink ?: boolean ;
250
+
244
251
/**
245
252
Show the `Save Link As…` menu item when right-clicking on a link.
246
253
@@ -325,6 +332,7 @@ declare namespace contextMenu {
325
332
- `showCopyVideoAddress`
326
333
- `showSaveVideo`
327
334
- `showSaveVideoAs`
335
+ - `showCopyLink`
328
336
- `showSaveLinkAs`
329
337
- `showInspectElement`
330
338
- `showServices`
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ const create = (win, options) => {
289
289
options . showSaveVideoAs && defaultActions . saveVideoAs ( ) ,
290
290
options . showCopyVideoAddress && defaultActions . copyVideoAddress ( ) ,
291
291
defaultActions . separator ( ) ,
292
- defaultActions . copyLink ( ) ,
292
+ options . showCopyLink !== false && defaultActions . copyLink ( ) ,
293
293
options . showSaveLinkAs && defaultActions . saveLinkAs ( ) ,
294
294
defaultActions . separator ( ) ,
295
295
shouldShowInspectElement && defaultActions . inspect ( ) ,
Original file line number Diff line number Diff line change @@ -199,6 +199,13 @@ Default: `false`
199
199
200
200
Show the ` Save Video As… ` menu item when right-clicking on a video.
201
201
202
+ #### showCopyLink
203
+
204
+ Type: ` boolean ` \
205
+ Default: ` true `
206
+
207
+ Show the ` Copy Link ` menu item when right-clicking on a link.
208
+
202
209
#### showSaveLinkAs
203
210
204
211
Type: ` boolean ` \
@@ -285,6 +292,7 @@ The following options are ignored when `menu` is used:
285
292
- ` showCopyVideoAddress `
286
293
- ` showSaveVideo `
287
294
- ` showSaveVideoAs `
295
+ - ` showCopyLink `
288
296
- ` showSaveLinkAs `
289
297
- ` showInspectElement `
290
298
- ` showServices `
You can’t perform that action at this time.
0 commit comments