X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=api-viewer%2FPVEAPI.js;fp=api-viewer%2FPVEAPI.js;h=dd36fff5792a1f44bb9cbda663c8b9b6e5d14037;hp=d0da407d324238d9c748abca97175c9896642ac8;hb=16e6779d4c6e604dd849000e0e3e3a460506e89c;hpb=88a31964c31052eff07ed4b6f651b186cdcf912b diff --git a/api-viewer/PVEAPI.js b/api-viewer/PVEAPI.js index d0da407..dd36fff 100644 --- a/api-viewer/PVEAPI.js +++ b/api-viewer/PVEAPI.js @@ -368,6 +368,7 @@ Ext.onReady(function() { return; var rec = selections[0]; render_docu(rec.data); + location.hash = '#' + rec.data.path; } } }); @@ -389,4 +390,18 @@ Ext.onReady(function() { ] }); + var deepLink = function() { + var path = window.location.hash.substring(1); + var endpoint = store.findNode('path', path); + + if (endpoint) { + tree.getSelectionModel().select(endpoint); + tree.expandPath(endpoint.getPath()); + render_docu(endpoint.data); + } + } + window.onhashchange = deepLink; + + deepLink(); + });