{
  "version": 1,
  "title": "URL Decode",
  "type": "shellScript",
  "template": "#!/usr/bin/osascript -l JavaScript\nObjC.import('Foundation');\n\nvar input = ObjC.unwrap($.NSProcessInfo.processInfo.environment.objectForKey('ONTEXT_TEXT'));\nvar output;\ntry {\n  output = decodeURIComponent(input.replace(/\\+/g, ' '));\n} catch (error) {\n  throw new Error('The selection is not valid percent-encoded text.');\n}\n\n$.NSFileHandle.fileHandleWithStandardOutput.writeData($(output).dataUsingEncoding($.NSUTF8StringEncoding));\nundefined;\n",
  "regex": "^(?=[\\s\\S]*\\S)[\\s\\S]*$",
  "outputBehavior": "replaceSelection",
  "marketplace": {
    "id": "starter-url-decode",
    "signature": "MeJSl6UdT/m5TYWuVxPjKiYeE5BvzAM8R7eoc48hYX4zBExP5VEL4ZRfsrqzHYa64CfYw5DXymGcec9oWJqHCg=="
  }
}
