Drafts Action — Add To List


#1

I made a minor change in Drafts. It works but, is it correctly written?

I installed Add To Lists a two step action in Drafts

This action is used to append items to running lists in Drafts. Useful for things like capturing movies you want to watch or stuff to pick up at the grocery store.

It appends to the bottom of the selected list.

The first step as downloaded.

const listTag = ‘lists’;

// true to append

// false to prepend

const appendItem = true;

I changed it to put items at the top of the list.

const listTag = ‘lists’;

// true to preappend

// false to append

const appendItem = false;

This works but… Is the last line the way to go?

@dchar wrote differently


#2

Isn’t @dchar just highlighting the original script content that would change in that referenced thread? The fact that it’s his script and that it works as intended and described suggests there’s no issue here.


#3

Your change is fine to prepend items. You don’t need to modify the comments (lines starting with //)

In the post you referenced, I was just trying to show the options and lines to customize. Sorry for the confusion.


#4

Right now, I’m prebeginner on this stuff. I poke around and see if something happens. Given time and learning I like to understand better practices.

Confusion is mine…