From 8e9cea02f627dbaf2977f13ac5f1917b577bb6f3 Mon Sep 17 00:00:00 2001 From: Karan Preet Singh Sasan Date: Tue, 21 Sep 2021 21:23:27 +0530 Subject: [PATCH] Small Fix --- facade-app/src/Components/Content.tsx | 13 ++++++++++++- facade-app/src/Utilities/Utils.ts | 5 ++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/facade-app/src/Components/Content.tsx b/facade-app/src/Components/Content.tsx index c263448..200c507 100644 --- a/facade-app/src/Components/Content.tsx +++ b/facade-app/src/Components/Content.tsx @@ -75,6 +75,8 @@ export class Content extends React.Component { render() { const { activeVulnerability, + activeApplication, + activeLevel, activateHomePage, activateAboutUsPage, showHints, @@ -121,7 +123,16 @@ export class Content extends React.Component { collapsible={true} defaultExpanded={false} expanded={showHints} - onSelect={() => setGlobalState({ showHints: !showHints })} + onSelect={() => + setGlobalState({ + activeApplication: activeApplication, + activeVulnerability: activeVulnerability, + activeLevel: activeLevel, + activateHomePage: false, + activateAboutUsPage: false, + showHints: !showHints, + }) + } >
    {this.selectedLevel.hints.map((hint) => { diff --git a/facade-app/src/Utilities/Utils.ts b/facade-app/src/Utilities/Utils.ts index acb25c6..2606f6c 100644 --- a/facade-app/src/Utilities/Utils.ts +++ b/facade-app/src/Utilities/Utils.ts @@ -34,9 +34,8 @@ export function appendStaticResourcesToDocument(selectedLevel: LevelInformation) (resourceURI) => { if (resourceURI.resourceType === ResourceType.JAVASCRIPT) { const script = document.createElement("script"); - script.src = resourceURI.uri; - script.type = "text/javascript"; - script.async = true; + script.src = resourceURI.uri + "?p=" + new Date().getTime(); + script.type = "module"; document.getElementById("scripts")?.appendChild(script); } else if (resourceURI.resourceType === ResourceType.CSS) { let cssElement = document.createElement("link");