I found and fixed bug: When in URL query was put without # at the end the page would start reloading indefinitely Co-authored-by: Adam Bem <adam.bem@zoho.eu> Reviewed-on: #210 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com>
This commit is contained in:
@@ -21,6 +21,7 @@ input {
|
|||||||
border: 2px solid rgba(93, 99, 96, 0.705);
|
border: 2px solid rgba(93, 99, 96, 0.705);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
display: block;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ function init() {
|
|||||||
|
|
||||||
changeActiveTools('XML');
|
changeActiveTools('XML');
|
||||||
var toolUrl = window.location.search.substring(1);
|
var toolUrl = window.location.search.substring(1);
|
||||||
if (toolUrl == "")
|
if (tools.has(toolUrl))
|
||||||
loadLastPage();
|
|
||||||
else if (tools.has(toolUrl))
|
|
||||||
changeTool(toolUrl);
|
changeTool(toolUrl);
|
||||||
else
|
else
|
||||||
loadLastPage();
|
loadLastPage();
|
||||||
@@ -85,10 +83,12 @@ function changeActiveTools(activeCategoryButton) {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function changeTool(tool) {
|
function changeTool(tool) {
|
||||||
const url = tools.get(tool);
|
if (tools.has(tool)) {
|
||||||
localStorage.setItem("lastPage", tool);
|
const url = tools.get(tool);
|
||||||
document.getElementById("iframe").src = url;
|
document.location.search = tool + "/";
|
||||||
document.location.search = tool;
|
localStorage.setItem("lastPage", tool);
|
||||||
|
document.getElementById("iframe").src = url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user