[Slider] Transpile

This commit is contained in:
2026-02-11 11:07:12 +01:00
parent 2fd64222d6
commit ea5eaae6bb

View File

@@ -153,7 +153,6 @@ var loadImageType = (name) => {
sliderElements.forEach(el => {
const baseURL = el.dataset.imageBaseURL;
const filetype = el.dataset.filetype;
// TODO: Verification (i.e. baseURL cannot contain .something in the end, filetype may only be jpg, jpeg, webp, svg or png)
if (allowedExtensions.indexOf(filetype) === -1) {
console.warn('[ SLIDER ] Invalid filetype ' + filetype + ' for image element with id ' + el.id);
return;
@@ -162,7 +161,7 @@ var loadImageType = (name) => {
console.warn('[ SLIDER ] ImageBaseURL incorrect for image element with id ' + el.id);
return;
}
el.style.setProperty('background-image', baseURL + name + filetype);
el.style.setProperty('background-image', `url(${baseURL}${name}${filetype})`);
});
};
for (const el in fetchedElements) {