Files

1 line
2.0 KiB
Plaintext

{"version":1,"name":"ReadMeFirst","help":"Any text you put here will be displayed as a tooltip when you hover over the name of the function in the menu. You can use this to document what the function does and what arguments it accepts.","body":"// Welcome to the Send Later function editor!\n//\n// The editor allows you to create JavaScript functions implementing complex\n// message scheduling logic which can be associated with shortcut buttons or\n// selected in the Send Later dialog.\n//\n// As you can see above, when a scheduling function is called, it will be given\n// three arguments:\n// * \"specname\" is needed if you want this function to recur (see below)\n// * \"prev\" is the previous scheduled send time, if this is a recurring\n// invocation\n// * \"args\" is the extra arguments returned by the previous invocation if this\n// is a recurring invocation\n//\n// Your code needs to set the variables \"next\", \"nextspec\", and\n// \"nextargs\" as follows:\n//\n// * \"next\" is either the number of minutes in the future or a Date object\n// indicating when the message should be sent.\n// * \"nextspec\" is a recurrence specification if this is intended to be a\n// recurring message (see\n// http://blog.kamens.us/send-later/#dynamic-recurrence). If you don't set\n// this, then the message will only be sent once. Note: if you want your\n// function to be called again for recurrence, do:\n// nextspec = \"function \" + specname\n// * \"nextargs\" is an array of arguments you want to be passed into the next\n// invocation of the function as \"args\".\n//\n// While you are working on your function, you can test it by filling in values\n// for \"prev\" and \"args\" in the Text boxes below and then clicking \"Run\" to\n// execute the function and see the results.\n//\n// There are two pre-configured sample functions, \"BusinessHours\" and\n// \"DaysInARow\", which you can look at and play with to learn more.\n//\n// This \"ReadMeFirst\" function just causes the message to be sent around now,\n// via the following line.\nnext = new Date();"}