Hmm, I don’t have anything official for the Defer script, but here is the script for the “Defer: Monday” script that you can edit for all the other defer scripts.
/*{
"type": "action",
"targets": ["omnifocus"],
"author": "Serena",
"identifier": "com.serena.of.monday",
"version": "1.0",
"description": "This plug-in will set the defer date to next Monday",
"label": "Defer: Monday",
"shortLabel": "Defer: Monday"
}*/
(() => {
var action = new PlugIn.Action(function(selection, sender){
var formatter = Formatter.Date.withStyle(Formatter.Date.Style.Short)
var d = new Date();
var deferMon = formatter.dateFromString("next Monday @ 9:30AM"); /* This sets the defer date to next Monday */
var dueMon = formatter.dateFromString("next Monday"); /* This is the empty due date starting at 12am */
selection.tasks.forEach(task => {
task.deferDate = deferMon;
if(task.dueDate !== null){
var oldDue = task.dueDate;
var newDue = new Date(dueMon.getFullYear(), dueMon.getMonth(), dueMon.getDate(), oldDue.getHours(), oldDue.getMinutes());
task.dueDate = newDue;
}
})
});
action.validate = function(selection, sender){
return (selection.tasks.length > 0 )
};
return action;
})();