From 0e4381bc343356ecac2f97d3e7c72521dc7c6656 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 28 May 2023 01:13:23 +0000 Subject: [PATCH] style fixes, bug fixes --- UI/GeneralUI.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/GeneralUI.js b/UI/GeneralUI.js index b4bf6ba..85492cc 100755 --- a/UI/GeneralUI.js +++ b/UI/GeneralUI.js @@ -206,7 +206,10 @@ export class GeneralUI const length = e.length; for (let i = 0; i < length; ++i) { - e[i].src = UriFactory.build(e[i].src); + if (e[i].getAttribute('data-src') !== null) { + // prevent double loading + e[i].src = UriFactory.build(e[i].getAttribute('data-src')); + } e[i].addEventListener('load', function () { const spinner = this.parentElement.getElementsByClassName('ispinner');