How to close all independent preview windows with one click

Maybe this link can help..
https://resource.dopus.com/t/open-and-close-viewer-with-single-hotkey/37586