Solved #180 and one other bug #210

Merged
bema merged 3 commits from bema/fix/broken_layout_mock into master 2023-05-26 11:39:59 +02:00
Showing only changes of commit 50012a8a04 - Show all commits

View File

@@ -31,9 +31,7 @@ function init() {
changeActiveTools('XML');
var toolUrl = window.location.search.substring(1);
if (toolUrl == "")
loadLastPage();
else if (tools.has(toolUrl))
if (tools.has(toolUrl))
changeTool(toolUrl);
else
loadLastPage();
@@ -85,10 +83,9 @@ function changeActiveTools(activeCategoryButton) {
* @returns {void}
*/
function changeTool(tool) {
console.log("changeTool");
if (tools.has(tool)) {
const url = tools.get(tool);
document.location.search = tool;
document.location.search = tool + "/";
localStorage.setItem("lastPage", tool);
document.getElementById("iframe").src = url;
}