Sentence:  The previous scandals , <WSD>gaily</WSD> diverting as they were , had only served to increase his popularity . 
Meaning of the word marked with <WSD> tags:  in a gay manner