Hi htere! Great and happy to have it… maybe I don’t understand the philosophy of Drafts for Mac: but how to capture notes or links from ohter apps (Safari etc.) and share it with Drafts?
There’s now a way to share with the services menu:
Great news. (great work:)
I am trying the share menu in Firefox for Mac. Firstly it only captures the URL. Is there any plan to provide support for capturing the selection? I can only see having to do a CTRL-C and activate the quick capture, but I am looking for something simpler in the manner of a bookmarklet. I am looking for behaviour similar to Evernote clipper.
I would probably put togethera bookmarklet if I knew where the callback URL scheme for Mac was documented. Anyone know where to look?
The URL scheme docs are valid for both platforms. Differences are noted.
And is there a way to trigger the quick capture window? It seems Mac share extensions are really simple by design, but on iOS of course it is different.
*** Sorry corrected code, this can be minified ***
I’ll own up I’ve scalped a bookmarklet I use with nvAlt, seems to produce useful results.
You may want to minify this, it’s purpose is clearer here.
No URL for the capture window. It’s stateful, so presents problems - you might have scratchpad content there you don’t want to override.
I made a mess of the minification I think it’s OK now. This is a start and really helps. My usage of Drafts is not sophisticated I mainly use for snippets and now I have a handy shortcut it’ll probably come in useful.
Should that second line be
var e = window?
e is used for the page URL later on and I’m thinking
% 20 may be some spurious failed URL encoding.
Later on it looks like there’s a mix of manual and programmatic URL encoding taking place. I haven’t tried this as it stands, but I’m wondering if that’s intentional or if somethings happened in transferring the bookmark let to the forum post?
So I was using automated unminify obviously when you minify it will come out as
Perhaps just post the minified code then as the structure seems to be off when you’ve automated the un-minification. It would seem better to post working code in a minified format than non-working code in an expanded format.
So I’ll do that next time sorry about this but I only had the minified code available you can’t blame me for trying?
No apologies necessary but would it not make sense to post the actual minified code that you are using this time as well? Otherwise people are going to have to jump through hoops to fix what you posted earlier in order to use it.
Maybe when I get to my Mac I’ll copy and paste what I’ve got, but I wouldn’t say using an online minifier is too many steps to take. I thought it would be helpful to prettify the code so folks could see what it did as far as I know I didn’t ‘unminify’ it so the url encoding should be safe.
No, but if the code is incorrect as presented, then no automated un-/minification will fix it. Unless I’m mistaken and the code work perfectly as is.
That’s why I suggested that you consider posting the working (minified) code as you are using it.
Just based on my queries above and trying to make sense of the code. I may be wrong, but the code above does not look right to me; as per the points I’d tried to set out.