
document.addEventListener('DOMContentLoaded', function () {
	var buttons = document.querySelectorAll('.upsd-confirm-action');
	if (!buttons.length) {
		return;
	}

	buttons.forEach(function (button) {
		button.addEventListener('click', function (event) {
			var ok = window.confirm((window.upsdAdmin && window.upsdAdmin.confirmCleanup) || 'Are you sure?');
			if (!ok) {
				event.preventDefault();
			}
		});
	});
});
