How to create a macro to automatically extend silences of variable duration?

There is an ExtendSilence plugin,
(but I don’t think it will do the synchronize-to-10-second-intervals specification).