Tools can be selected through URL (solves #161) #207
| @@ -30,7 +30,14 @@ function init() { | ||||
|     tools.set("mock", "tools/mock.html"); | ||||
|  | ||||
|     changeActiveTools('XML'); | ||||
|     loadLastPage(); | ||||
|     var toolUrl = window.location.search.substring(1); | ||||
|     if (toolUrl == "") | ||||
|         loadLastPage(); | ||||
|     else if (tools.has(toolUrl)) | ||||
|         changeTool(toolUrl); | ||||
|     else | ||||
|         loadLastPage(); | ||||
|      | ||||
| } | ||||
|  | ||||
| /** | ||||
| @@ -81,6 +88,7 @@ function changeTool(tool) { | ||||
|     const url = tools.get(tool); | ||||
|     localStorage.setItem("lastPage", tool); | ||||
|     document.getElementById("iframe").src = url; | ||||
|     document.location.search = tool; | ||||
| } | ||||
|  | ||||
| /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user