Place the butter and onion in a 9x13 inch baking dish, and bake in the preheated oven, stirring occasionally, until the onion is translucent, about 15 minutes. Remove the dish from the oven, push the onion over to one end, and place the chicken thighs in the dish in a single layer. Return to the oven and bake for about 25 minutes.
Stir together the ketchup, brown sugar, vinegar, mustard powder, and cranberry sauce in a bowl. Remove the chicken from the oven, and scoop the cooked onions into the cranberry mixture. Spoon the mixture over the chicken thighs, and return to the oven.
Bake until the cranberry mixture is slightly caramelized and the chicken is done, about 20 more minutes. An instant-read thermometer inserted near the center should read 165 degrees F (74 degrees C).