Skip to content

Commit

Permalink
Merge pull request #48 from SasanLabs/develop
Browse files Browse the repository at this point in the history
Fixing some bugs in VulnerableApp-Facade
  • Loading branch information
preetkaran20 authored Sep 21, 2021
2 parents 058979a + 8e9cea0 commit bb17d81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 12 additions & 1 deletion facade-app/src/Components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export class Content extends React.Component<Props> {
render() {
const {
activeVulnerability,
activeApplication,
activeLevel,
activateHomePage,
activateAboutUsPage,
showHints,
Expand Down Expand Up @@ -121,7 +123,16 @@ export class Content extends React.Component<Props> {
collapsible={true}
defaultExpanded={false}
expanded={showHints}
onSelect={() => setGlobalState({ showHints: !showHints })}
onSelect={() =>
setGlobalState({
activeApplication: activeApplication,
activeVulnerability: activeVulnerability,
activeLevel: activeLevel,
activateHomePage: false,
activateAboutUsPage: false,
showHints: !showHints,
})
}
>
<ol>
{this.selectedLevel.hints.map((hint) => {
Expand Down
5 changes: 2 additions & 3 deletions facade-app/src/Utilities/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit bb17d81

Please sign in to comment.