Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-05-02 11:02:10 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-05-02 11:04:09 -0700
commita69623b0ab6baff9f968e126c25d7e961e9dde53 (patch)
treed1f84b493cb3cbf1f2ba8df61f9ff8bd6099277f /src/index.js
parent9ac571cc244ef02a32679f3fb47ffee5f7e0fd7c (diff)
Organize public directory contents into assets folders
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js
index 4c7db30..800eea7 100644
--- a/src/index.js
+++ b/src/index.js
@@ -10,7 +10,7 @@ const mapPlaceholder = document.querySelector('.map-placeholder'),
proneToggle = document.getElementById('toggle-prone-counter'),
contentVisToggleEl = document.querySelector('#content input[type="checkbox"].visible'),
object = document.querySelector('object'),
- fileName = `${localStorage.getItem('map') || 'map1'}.svg`,
+ fileName = `assets/images/${localStorage.getItem('map') || 'map1'}.svg`,
toggleContentVis = (function () {
document.querySelectorAll('#content div').forEach(div => {
@@ -132,5 +132,5 @@ object.addEventListener('load', load);
objectDataObserver.observe(object, { attributeFilter: ['data'] });
if (object.getAttribute('data') !== fileName) {
- object.data = fileName;
+ object.data = `assets/images/${fileName}`;
}