Question
Delete comment on specific page using Javascript action
Could anyone please assist me with the following:
Goal:
I would like to adapt the below Javascript action, it should only delete any comment on the same page as the button (where executed) that has a specific author.
My effort so far
this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
for (var i=annots.length-1; i>=0; i--) {
if (annots[i].author == "JonDoe" )
annots[i].destroy();
}
}
Many thanks
