Wrap the tofu in a kitchen towel to remove excess moisture.
Cut the tofu into bite-sized pieces.
Heat cooking oil in a pan and cook the tofu until golden brown on both sides.
Let the tofu cool and place it in a bowl.
Add mayonnaise, soy sauce, sugar, and chopped onion to the bowl and mix well.
Season with salt and pepper to taste, and serve.