Skip to content

Commit

Permalink
revise variables and template path
Browse files Browse the repository at this point in the history
  • Loading branch information
TRMSC committed Nov 2, 2023
1 parent fd313df commit 95594bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ generateScene = () => {

// Get template
let templateName = document.getElementById('imagescene-template').value;
let templatePath = '../templates/' + templateName + '.svg';
//let templatePath = '../templates/' + templateName + '.svg';
let templatePath = 'https://raw.githubusercontent.com/TRMSC/imagescene-generator/main/templates/' + templateName + '.svg';

// Fetch template content
fetch(templatePath)
Expand All @@ -330,6 +331,7 @@ generateScene = () => {
})
.then(templateContent => {
// Handle template content
let templateContent = templateContent;
templateContent = templateContent.replace(/\$URL/g, url);
templateContent = templateContent.replace(/\$WIDTH/g, wInput.value);
templateContent = templateContent.replace(/\$HEIGHT/g, hInput.value);
Expand Down

0 comments on commit 95594bc

Please sign in to comment.