// ==UserScript== // @name org-protocol // @version 2 // @grant none // ==/UserScript== window.addEventListener("keydown", function (event) { if (event.defaultPrevented) { return; // Do nothing if the event was already processed } if (event.key === "l" && event.ctrlKey) { event.preventDefault(); location.href = 'org-protocol://store-link?url=' + encodeURIComponent(location.href) + '&title=' + document.title; } if (event.key === ";" && event.ctrlKey) { event.preventDefault(); location.href = 'org-protocol://capture?template=t' + '&url=' + encodeURIComponent(window.location.href) + '&title=' + document.title + '&body=' + window.getSelection(); } if (event.key === "'" && event.ctrlKey) { event.preventDefault(); location.href = 'org-protocol://grok?url=' + encodeURIComponent(location.href); } }, true);