Fixed bug with category not bein remembered
This commit is contained in:
@@ -87,8 +87,18 @@ function changeActiveTools(activeCategoryButton) {
|
||||
function changeTool(tool) {
|
||||
const url = tools.get(tool);
|
||||
localStorage.setItem("lastPage", tool);
|
||||
document.getElementById("iframe").src = url;
|
||||
|
||||
switch (tool) { // XML category is default.
|
||||
case "jsonform":
|
||||
changeActiveTools('JSON');
|
||||
break;
|
||||
case "mock":
|
||||
changeActiveTools('REST');
|
||||
break;
|
||||
|
||||
}
|
||||
document.location.search = tool;
|
||||
document.getElementById("iframe").src = url;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,15 +114,5 @@ function loadLastPage() {
|
||||
if (lastPage == null) {
|
||||
lastPage = "xpath";
|
||||
}
|
||||
|
||||
switch (lastPage) { // XML category is default.
|
||||
case "jsonform":
|
||||
changeActiveTools('JSON');
|
||||
break;
|
||||
case "mock":
|
||||
changeActiveTools('REST');
|
||||
break;
|
||||
|
||||
}
|
||||
document.getElementById("iframe").src = tools.get(lastPage);
|
||||
changeTool(lastPage);
|
||||
}
|
||||
Reference in New Issue
Block a user