Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 1d086ef

Browse files
Add option to open image in browser
1 parent 9d711a4 commit 1d086ef

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/context-menu-and-spellcheck.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ function setupContextMenuAndSpellCheck (config, { navigate, get }) {
9595
}
9696
})
9797
menu.append(copyEmbed)
98+
const openImageInBrowser = new MenuItem({
99+
label: 'Open Image with Browser',
100+
click: () => {
101+
const host = config.ws.host === '::' ? 'localhost' : config.ws.host
102+
const blobKey = encodeURIComponent(extractedRef)
103+
const url = `http://${host}:${config.ws.port}/blobs/get/${blobKey}`
104+
shell.openExternal(url)
105+
}
106+
})
107+
menu.append(openImageInBrowser)
98108
}
99109
}
100110

0 commit comments

Comments
 (0)