Hi John,
".name" should be added in the 8th line with appliedParagraphStyle. Change the 8th line of Jarek's script as like below.
if(_selection[i].appliedParagraphStyle.name == "01 H1" && ignoreWords.indexOf(_selection[i].contents) == -1)
Regards,
Chinna