1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# PopClip - Obsidian extension, markdown variant
name: OBSClipper
icon: iconify:logos:obsidian-icon
options:
- identifier: vault
label: vault
type: string
capture html: true # this is needed when we want markdown text
javascript: |
const vaultName = encodeURIComponent(popclip.options.vault)
let clipping = popclip.input.markdown
if (popclip.context.browserUrl.length > 0) { // append markdown source link if available
clipping += `\n [${popclip.context.browserTitle}](${popclip.context.browserUrl})`
}
clipping = encodeURIComponent(clipping)
popclip.openUrl(`obsidian://advanced-uri?vault=${vaultName}&daily=true&heading=Clippings&data=%0A-%20${clipping}&mode=append`)
#end
|