blocks_vertical/data.js
function() {
    this.jsonInit({
      "message0": "%1",
      "args0": [
        {
          "type": "field_numberdropdown",
          "name": "INDEX",
          "value": "1",
          "min": 1,
          "precision": 1,
          "options": [
            ["1", "1"],
            [Blockly.Msg.DATA_INDEX_LAST, "last"],
            [Blockly.Msg.DATA_INDEX_RANDOM, "random"]
          ]
        }
      ],
      "category": Blockly.Categories.data,
      "extensions": ["colours_textfield", "output_string"]
    });
  }
function() {
    this.jsonInit({
      "message0": "%1",
      "args0": [
        {
          "type": "field_numberdropdown",
          "name": "INDEX",
          "value": "1",
          "min": 1,
          "precision": 1,
          "options": [
            ["1", "1"],
            [Blockly.Msg.DATA_INDEX_LAST, "last"],
            [Blockly.Msg.DATA_INDEX_RANDOM, "random"]
          ]
        }
      ],
      "category": Blockly.Categories.data,
      "extensions": ["colours_textfield", "output_string"]
    });
  }
function ( ) { this . jsonInit ( { "message0" : "%1" , "args0" : [ { "type" : "field_numberdropdown" , "name" : "INDEX" , "value" : "1" , "min" : 1 , "precision" : 1 , "options" : [ [ "1" , "1" ] , [ Blockly . Msg . DATA_INDEX_LAST , "last" ] , [ Blockly . Msg . DATA_INDEX_RANDOM , "random" ] ] } ] , "category" : Blockly . Categories . data , "extensions" : [ "colours_textfield" , "output_string" ] } ) ; }
List index menu, with random option.
@this Blockly.Block
List index menu with random option .