82addf257c3e62738dc588cc36382286354b7274 chmalee Thu Sep 25 16:11:56 2025 -0700 Warn hubspace users that the feature is only available over https, refs Jairo email diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js index a2ca073ea24..a6283d32414 100644 --- src/hg/js/hgMyData.js +++ src/hg/js/hgMyData.js @@ -1480,25 +1480,31 @@ function handleRefreshState(jsonData, textStatus) { if (checkJsonData(jsonData, 'handleRefreshState')) { handleGetFileList(jsonData, true); } } function handleErrorState(jqXHR, textStatus) { cart.defaultErrorCallback(jqXHR, textStatus); } function init() { cart.setCgiAndUrl(fileListEndpoint); cart.debug(debugCartJson); // get the file list immediately upon page load + const url = new URL(window.location.href); + if (url.protocol === "http:") { + warn(`This feature is only available over HTTPS. Please load the HTTPS version of ` + + `our site: <a href="https:${url.host}${url.pathname}${url.search}">https:${url.host}${url.pathname}${url.search}</a>`); + } else { cart.send({ getHubSpaceUIState: {}}, handleRefreshState, handleErrorState); cart.flush(); } + } return { init: init, uiState: uiState, defaultDb: defaultDb, makeGenomeSelectOptions: makeGenomeSelectOptions, detectFileType: detectFileType, }; }());