From 9c9190be938068cd3eb12b8efd87311fdf0403d3 Mon Sep 17 00:00:00 2001 From: Denis Papp Date: Wed, 31 Jul 2024 13:09:34 -0500 Subject: [PATCH] fixed localStorage.frontendConfig being clobbered in localhost:3000 testing --- my-index.ejs | 57 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/my-index.ejs b/my-index.ejs index c130d72a534..7439a385201 100644 --- a/my-index.ejs +++ b/my-index.ejs @@ -10,37 +10,36 @@ window.frontendConfig = { } + /* REMOVED: This is an example of how to add custom tabs to the patient page. Enabling this will clobber localStorage.frontendConfig that is set through the browser console localStorage.frontendConfig = JSON.stringify( - { - serverConfig:{ - - custom_tabs:[ - { - title: 'Sync Tab', - id: 'customTab1', - location: 'PATIENT_PAGE', - mountCallback: `(div)=>{ - $(div).html("tab for patient " + window.location.search.split("=").slice(-1)) - }`, - }, { - title: 'Async Tab', - id: 'customTab2', - location: 'PATIENT_PAGE', - hideAsync: `()=>{ - return new Promise((resolve)=>{ - setTimeout(()=>{ - resolve(true); - }, 2000); - }); - }`, - }, - ] - - } - - } - ); + serverConfig:{ + + custom_tabs:[ + { + title: 'Sync Tab', + id: 'customTab1', + location: 'PATIENT_PAGE', + mountCallback: `(div)=>{ + $(div).html("tab for patient " + window.location.search.split("=").slice(-1)) + }`, + }, + { + title: 'Async Tab', + id: 'customTab2', + location: 'PATIENT_PAGE', + hideAsync: `()=>{ + return new Promise((resolve)=>{ + setTimeout(()=>{ + resolve(true); + }, 2000); + }); + }`, + }, + ] + } + }); + */ function renderCustomTab1(div, tab){ $(div).append(`
this is the content for ${tab.title}
`);