From 217de6dcf3bb669a0420adb08b69536070a410cc Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Thu, 22 Feb 2024 01:54:33 +0530 Subject: [PATCH] remove encoding while get --- src/js/macros.js | 9 +++------ src/pug/templates/control-view.pug | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/js/macros.js b/src/js/macros.js index 0a8d276..26e9e01 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -99,12 +99,9 @@ module.exports = { } const file = this.fileName; if (file != "default") { - const response = await fetch( - `/api/file/EgZjaHJvbWUqCggBEAAYsQMYgAQyBggAEEUYOTIKCAE${encodeURIComponent(file)}`, - { - cache: "no-cache", - }, - ); + const response = await fetch(`/api/file/EgZjaHJvbWUqCggBEAAYsQMYgAQyBggAEEUYOTIKCAE${file}`, { + cache: "no-cache", + }); if (response.status == 200) { const text = await response.text(); this.newGcode = text; diff --git a/src/pug/templates/control-view.pug b/src/pug/templates/control-view.pug index bfa03ba..0aa0148 100644 --- a/src/pug/templates/control-view.pug +++ b/src/pug/templates/control-view.pug @@ -226,7 +226,7 @@ script#control-view-template(type="text/x-template") .macros-div(class="present") button.macros-button(title="Click to run Macros",v-for="(index,macros) in config.macros", - @click="runMacros(index)",:disabled="!is_ready",v-bind:style="{ backgroundColor: macros.color; }") {{macros.name}} + @click="runMacros(index)",:disabled="!is_ready",v-bind:style="{ backgroundColor: macros.color }") {{macros.name}} .tabs