I ended up eating this after failing to make tofu croquettes.
Finely chop the onion.
Remove excess water from the tofu and mash it.
Mix the chopped onion and mashed tofu together.
Season with salt and pepper.
Make the mixture into bite-sized round pieces.
Heat oil in a pan and cook the patties on both sides until golden brown.