let params = getUrlVars();
let isPathdb = false;

if (params.hasOwnProperty('mode') && params.mode == 'pathdb') {
  PathDbMods();
  isPathdb = true;
}

// TESTING ONLY

params = {slide: 'VTRBC_gene_BC2390_BL3_00'};

// end testing

const store = new Store('../data/');

if (params.hasOwnProperty('slide')) {
  store.findSlide(params.slide, params.specimen, params.study, 0, 0, params.collection).then((x)=>{
    console.info(x);
    if (x.length <=0) {
      throw new Error('No Matches found');
    }
    if (isPathdb) {
      // get the pathdb url
      window.location = './viewer/viewer.html?slideId=' + a[0]['_id']['$oid'] + '&mode=pathdb';
    } else {
      // get the normal url
      window.location = './viewer/viewer.html?slideId=' + a[0]['_id']['$oid'];
    }
  }).catch((e)=>{
    console.error(e);
    alert('ERROR!');
  });
} else {
  console.error('no slide passed?');
  alert('ERROR!');
}

@@ -149,88 +149,8 @@
 %0A%7D%0A%0A
-// TESTING ONLY%0A%0Aparams = %7Bslide: 'VTRBC_gene_BC2390_BL3_00'%7D;%0A%0A// end testing%0A%0A
 cons
@@ -513,33 +513,33 @@
 tml?slideId=' + 
-a
+x
 %5B0%5D%5B'_id'%5D%5B'$oid
@@ -658,17 +658,17 @@
 eId=' + 
-a
+x
 %5B0%5D%5B'_id

remove testing params