const params = new URLSearchParams(window.location.search);
const id = params.get('id');
const newParams = new URLSearchParams();
let tab;
if (id && id.includes('DB')) tab = 'compounds';
if (id && id.includes('DOID')) tab = 'diseases';
if (tab) newParams.set('tab', tab);
if (id) newParams.set('id', id);
window.location = '/repurpose/?' + newParams.toString();