Cook onion in pan in about half of the butter until onion is translucent. Remove onion from pan with a slotted spoon, allowing the melted butter and pan drippings to remain in the pan.
Combine onion, mashed potatoes and egg. Sprinkle with flour. Add remaining butter to pan and heat to medium/high heat. Add potato pancakes and cook about 5 minutes each side until browned.
Leftover mashed potatoes take on the consistency of concrete when refrigerated and you never know what to do with them. They are actually very good is you just warm them up and add a little more milk and/ or butter. But now you have a second option.