diff --git a/dashboard/files.html b/dashboard/files.html index f4cf40b..4c455b4 100644 --- a/dashboard/files.html +++ b/dashboard/files.html @@ -1807,10 +1807,13 @@ }); function getPathFromURL() { + // ?file= survives login redirects; #hash works when already logged in. + const qp = new URLSearchParams(window.location.search).get('file'); + if (qp) return decodeURIComponent(qp); const hash = window.location.hash; return hash ? decodeURIComponent(hash.slice(1)) : ''; } - + window.addEventListener('hashchange', () => loadPath(getPathFromURL())); document.getElementById('codeEditor').addEventListener('input', function() {