What is the emotion for being glad of someone getting their just deserts

I know you're looking for a feeling, in either single noun or adjective terms, and I believe that we could say that the audience feels a sense of...

justice.

However, I think there are a few other common expressions that might also satisfy your general question:

The audience felt that...

... he got his comeuppance.

... justice had been served.

... he got his just deserts.

All of these convey the idea that someone who should be punished (e.g. the villain) did indeed get punished.

I believe merely uttering these expressions conveys the sense of satisfaction that you are asking about.


You can consider relief or righteous satisfaction.

Also used is vicarious release because you experience this through the feelings of the protagonist.

Seeing vengeance in a story provides us with a vicarious release, allowing us to harmlessly channel our vengeful anger that might otherwise get us into trouble. Seeing the villain punished gives a sense of righteous satisfaction and confirmation that right will always be done.

http://changingminds.org/disciplines/storytelling/plots/polti_situations/vengeance_crime.htm

Also, there is excitation-transfer theory that explains that the anger towards the bad guy turns into satisfaction when the bad guy is punished.

Excitation-transfer theory purports that residual excitation from one stimulus will amplify the excitatory response to another stimulus, though the hedonic valences of the stimuli may differ. The excitation-transfer process is not limited to a single emotion.

For example, when watching a movie, a viewer may be angered by seeing the hero wronged by the villain, but this initial excitation may intensify the viewer's pleasure in witnessing the villain's punishment later.

http://en.wikipedia.org/wiki/Excitation-transfer_theory


Depending on the personality of the person observing the villain's comeuppance, self-righteous gloating might well describe their motivation and emotional state.