Add the IDs of a message to the markup, so .js can find it later on.