divAlert.className = "alert";
divAlert.style.display = "none";
+ // eslint-disable-next-line require-unicode-regexp
+ if ((/iPad|iPhone|iPod/g).test(navigator.userAgent)) {
+ divAlert.classList.add("on-ipad");
+ }
+
divAlertContent = document.createElement("div");
divAlertContent.className = "alert-content";
divAlertContent.style.whiteSpace = "pre-wrap";
prepare();
}
+ divAlert.classList.remove("prompt");
+
divAlertContent.textContent = msg;
divAlertInput.style.display = "none";
divAlertConfirm.style.display = "none";
prepare();
}
+ divAlert.classList.add("prompt");
+
divAlertContent.textContent = msg;
divAlertInput.style.display = "";
alertInput.value = defaultText || "";
divAlertCallback = callback;
divAlert.style.display = "";
- // eslint-disable-next-line require-unicode-regexp
- if (!(/iPad|iPhone|iPod/g).test(navigator.userAgent)) {
- alertInput.focus();
- alertInput.setSelectionRange(0, alertInput.value.length);
- alertInput.select();
- }
+ alertInput.focus();
+ alertInput.setSelectionRange(0, alertInput.value.length);
+ alertInput.select();
};
global.myConfirm = function (msg, callbackYes, callbackNo) {
prepare();
}
+ divAlert.classList.remove("prompt");
+
divAlertContent.textContent = msg;
divAlertInput.style.display = "none";
divAlertConfirm.style.display = "";