×

Plug-In: Set Drop Repetition Preference

This plug-in presents an interface for settings the hidden preference for dropping an instance of repeating task.

Return to: OmniFocus Plug-In Collection

Set Drop Repetition Preference
 

/*{ "type": "action", "targets": ["omnifocus"], "author": "Otto Automator", "identifier": "com.omni-automation.of.drop-repetition-preference", "version": "1.0", "description": "Set the hidden preference for dropping an instance of repeating task.", "label": "Set Drop Repetition Preference", "shortLabel": "Drop Repetition Pref", "paletteLabel": "Drop Repetition Pref", "image": "gearshape" }*/ (() => { var action = new PlugIn.Action(async function(selection, sender){ var preferenceURL = "omnifocus:///change-preference?OFMAutomaticDropRepeatingTaskBehavior=" var optionsMenu = new Form.Field.Option( "prefValue", null, ["prompt","dropSingleOccurrence","dropCompletely"], ["Prompt","Drop Single Occurrence","Drop Completely"], "prompt" ) var inputForm = new Form() inputForm.addField(optionsMenu) var formPrompt = "Select the default behavior for dropping a repeating instance:" var buttonTitle = "Continue" var formObject = await inputForm.show(formPrompt,buttonTitle) var prefValue = formObject.values["prefValue"] URL.fromString(preferenceURL + prefValue).open() }); action.validate = function(selection, sender){ return true }; return action; })();