2062c2da5318c4ccec237e9e099c97e447a52f06 chmalee Thu Sep 25 17:08:39 2025 -0700 Don't do hubSpace init if we are looking at a different hgHubConnect tab, call hubSpace init when we switch to that tab, refs Jairo email diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js index a6283d32414..85e78967f2e 100644 --- src/hg/js/hgMyData.js +++ src/hg/js/hgMyData.js @@ -1480,31 +1480,34 @@ 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); + let activeTab = $("#tabs").tabs( "option", "active" ); + if (activeTab === 3) { + let 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, }; }());