/** * Alert and Confirm modals. * * Usage: * * modalAlert({message: "Hello world!"}).then(callback); * modalConfirm({message: "Are you sure?"}).then(callback); * * Available options for modalAlert: * - message * - title: Alert * * Available options for modalConfirm: * - message * - title: Confirm * - buttons: ["Ok", "Cancel"] * - event (pass `event` for easy inline onclick handlers) * - element (pass `this` for easy inline onclick handlers) * * Example onclick for modalConfirm: * * * * The `element` is used to find the nearest