Skip to content

Commit

Permalink
Update HTMLScriptInjector.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jermOSS committed Jul 16, 2024
1 parent 218df55 commit eee129b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/utility/HTMLScriptInjector.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ const { writeFile } = require("node:fs/promises");
function injectScript(
htmlFilePath,
jsFilePath,
injectAfterTag,
stringInjection = {},
) {
// Tag to inject JavaScript after
const injectAfterTag = "<head>";
// Read the JavaScript file
const jsData = fs.readFileSync(jsFilePath, "utf8");
// Create a script tag with the JavaScript content
Expand Down Expand Up @@ -98,7 +99,7 @@ function injectHtmlscript() {
}

// Return html with injected javascript
return injectScript(htmlFilePath, jsFilePath, "<head>", {
return injectScript(htmlFilePath, jsFilePath, {
string: HTML_callGame_JS_string,
injectafter: injectafter_string,
});
Expand Down

0 comments on commit eee129b

Please sign in to comment.