mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
fix(electron): open custom protocol links as default condition
This commit is contained in:
@@ -5,7 +5,7 @@ const { ipcRenderer, contextBridge, shell, clipboard, webFrame } = require('elec
|
||||
const IS_MAC = process.platform === 'darwin'
|
||||
const IS_WIN32 = process.platform === 'win32'
|
||||
|
||||
const ALLOWED_EXTERNAL_PROTOCOLS = ['https:', 'http:', 'mailto:']
|
||||
const ALLOWED_EXTERNAL_PROTOCOLS = ['https:', 'http:', 'mailto:', 'zotero:', 'file:']
|
||||
|
||||
function getFilePathFromClipboard () {
|
||||
if (IS_WIN32) {
|
||||
|
||||
@@ -115,8 +115,7 @@
|
||||
(when parsed-url
|
||||
(condp contains? (.-protocol parsed-url)
|
||||
#{"https:" "http:" "mailto:"} (.openExternal shell url)
|
||||
#{"file:"} (when (empty? (.-host parsed-url)) (default-open url))
|
||||
nil))))
|
||||
(default-open url)))))
|
||||
|
||||
(defn setup-window-listeners!
|
||||
[^js win]
|
||||
|
||||
Reference in New Issue
Block a user