Fix issues with reloading

This commit is contained in:
Kenox 2022-11-04 09:27:35 +01:00
commit ff96f2ae92
2 changed files with 4 additions and 1 deletions

View file

@ -328,13 +328,16 @@ function highlightNew(code) {
} }
codes[i].style.removeProperty("background-color"); codes[i].style.removeProperty("background-color");
} }
const windowWidth = $(document).width(); const windowWidth = $(document).width();
console.log("Window width: " + windowWidth + " - MaxWidth: " + maxWidth)
if(windowWidth > maxWidth) if(windowWidth > maxWidth)
maxWidth = windowWidth; maxWidth = windowWidth;
for (let i = 0; i < codes.length; i++) { for (let i = 0; i < codes.length; i++) {
codes[i].style.width = maxWidth + 'px'; codes[i].style.width = maxWidth + 'px';
} }
code.style.backgroundColor = "rgba(187, 128, 9, 0.25)"; code.style.backgroundColor = "rgba(187, 128, 9, 0.25)";
} }

File diff suppressed because one or more lines are too long