From 1312726769e33c5faa6f46b99a6cdb06a17513df Mon Sep 17 00:00:00 2001 From: ADARSH <64017655+0x0806@users.noreply.github.com> Date: Sat, 5 Jul 2025 21:59:39 +0530 Subject: [PATCH] Update script.js --- script.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script.js b/script.js index 2d991a7..667b8ab 100644 --- a/script.js +++ b/script.js @@ -504,16 +504,16 @@ class PromptArsenal { .replace(/\s+/g, '_') // Replace spaces with underscores .replace(/_+/g, '_') // Replace multiple underscores with single .replace('.md', '.txt'); - console.log('Fetching from:', `./content/${safePath}`); - const response = await fetch(`./content/${safePath}`); + console.log('Fetching from:', `./${safePath}`); + const response = await fetch(`./${safePath}`); if (response.ok) { content = await response.text(); console.log('File loaded successfully:', filePath); this.fileContents.set(filePath, content); } else { - console.error('Error loading file:', response.status, 'Path:', `./content/${safePath}`); - content = `Error loading file: ${response.status}\nTried to load: ./content/${safePath}`; + console.error('Error loading file:', response.status, 'Path:', `./${safePath}`); + content = `Error loading file: ${response.status}\nTried to load: ./${safePath}`; this.showNotification(`Failed to load file: ${response.status}`, 'error'); } } catch (error) { @@ -571,7 +571,7 @@ class PromptArsenal { .replace(/_+/g, '_') // Replace multiple underscores with single .replace('.md', '.txt'); console.log('Loading preview for:', filePath, 'Safe path:', safePath); - const response = await fetch(`./content/${safePath}`); + const response = await fetch(`./${safePath}`); if (response.ok) { content = await response.text(); this.fileContents.set(filePath, content);