local GlobalApi = require("core/GlobalApi")

function onLoad()
  self.addContextMenuItem("Download", download)
end

function download(playerColor)
  local filename = self.getGMNotes()
  local player = Player[playerColor]
  local replace = self.guid
  GlobalApi.placeholderDownload(filename, player, replace)
end