Skip to content

Instantly share code, notes, and snippets.

@chibani
Created December 5, 2022 10:04
Show Gist options
  • Save chibani/cc453a40fd137399389cb3b2ba815cf4 to your computer and use it in GitHub Desktop.
Save chibani/cc453a40fd137399389cb3b2ba815cf4 to your computer and use it in GitHub Desktop.
Logseq Quickcapture (with selection)
javascript:var d = document,w = window,f = `logseq://x-callback-url/quickCapture?url=${e(l.href)}&title=${e(d.title)}&content=${e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)}&x-source=bm`,l = d.location,e = encodeURIComponent,a = () => l.href = f;if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0);else {a()}void(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment