Skip to content

Commit

Permalink
Fixed issue where saved URLs with index.html need to redirect to expr…
Browse files Browse the repository at this point in the history
…ession.html (issue #851)
  • Loading branch information
jorvis committed Aug 7, 2024
1 parent 6c25fc1 commit 148e608
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ let manually_entered_genes = [];

document.addEventListener('DOMContentLoaded', () => {

// if URL params are present, the user probably pasted a v1 URL into the browser
// so we should redirect them to the new expression URL but keep the same parameters
if (window.location.search) {
const url = new URL('/expression.html', window.location.origin);
url.search = window.location.search;
window.location = url.toString();
}

// handle when the dropdown-gene-list-search-input input box is changed
document.getElementById('genes-manually-entered').addEventListener('change', (event) => {
const search_term_string = event.target.value;
Expand Down

0 comments on commit 148e608

Please sign in to comment.