New “JS Scripting” action group

I’m discovering how powerful and flexible Drafts Scripting really is, even more so after it’s working on macOS as well.

Used to code in Python, so resisted JS for a while due to all { } ( ) ;

So went a bit overboard lately and made/improved (hopefully) an action group (based on @nahumck’s ) for easier indenting, commenting, skeleton code insertion, run code from editor, etc.

JS Scripting - Action Group

Just to make it easier to code and debug JS, specially from iPad onscreen keyboard. Now I don’t hate JS anymore :wink:

Hope you all like it :slight_smile:

5 Likes

Hey there. I’ve just installed your action group, but many of the actions fail, complaining that they can’t find a file called “insert.js” in my iCloud Drive.

Am I missing something?

Nealry 2 years later but posting on here so others who want to use this Action Group can see.

I’ve been playing with it and got it figured out. There’s an action called insert.js function(). Copy the code in that action and save it to a file called insert.js in the /drafts/library/scripts folder. Then the rest of these Actions will work.

LMAO. I’d tried this a while back and I‘d intended to spend some time getting it up and running. Happy for the reminder, and the pointer in the right direction. Thanks!

1 Like