function checkPopupSupport() { // Try to open a small test popup window const popup = window.open("about:blank", "_blank", "width=1,height=1"); // If the popup is blocked, it will return null if (!popup) { return false; } else { // Popup was allowed, close it immediately popup.close(); return true; } } function setLocationHref(url) { window.location = url; } function saveSessionValue(key, value) { sessionStorage.setItem(key, value); } function getSessionValueAndRemoveIt(key) { const value = sessionStorage.getItem(key); sessionStorage.removeItem(key); return value; } function reloadWindow() { window.location.reload(); } function consoleLog(msg) { window.console.log(msg); } function historyBack() { window.history.back(); }