|
From: | Max Nikulin |
Subject: | Re: [BUG] Org-protocol bookmarklets in Firefox behaving badly after recent upgrade [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.4/lisp/org/)] |
Date: | Thu, 12 Dec 2024 21:14:26 +0700 |
User-agent: | Mozilla Thunderbird |
Please, reply to the list. On 12/12/2024 17:34, Max Nikulin wrote:
On 12/12/2024 15:12, Rehan Deen wrote:javascript:location.href='org-protocol://store-link?'+new URLSearchParams({url:location.href, title:document.title});Try to add "(void)" javascript:(void)location.href='org-protocol:...
I hope, you used the full expression instead of ellipsis. I forgot about "+new", so it should be with another variant of parenthesis:
javascript:void(location.href='org-protocol:...) The idea is to discard a string returned by the assignment operator.Try to open web developer tools [F12] and switch to console. You might notice some error messages.
However bookmarklets are unsafe, you have to allow *web page* to launch a handler. In the case of an extension this permission may be given to the extension (but sprig/org-capture-extension still use the unsafe way).
You may try https://github.com/vifon/org-protocol-for-firefox/ that uses another method to launch external protocol handler.Personally I am interested in extracting as much page metadata as possible, so bookmarklets and simple extensions is not an option.
In future, I hope, it is better to avoid org-protocol.el hack with an advice and rely on the new `server-eval-args-left' feature.
[Prev in Thread] | Current Thread | [Next in Thread] |