URL &gotonode= now accepts HEX encoded NodeID.

This commit is contained in:
Ylian Saint-Hilaire 2020-08-24 13:49:40 -07:00
parent bace069d9f
commit 5aec7685f4
1 changed files with 1 additions and 0 deletions

View File

@ -3089,6 +3089,7 @@
if (getNodeFromId('{{currentNode}}') == null) return; // This node is not loaded yet if (getNodeFromId('{{currentNode}}') == null) return; // This node is not loaded yet
gotoDevice('{{currentNode}}', xviewmode); gotoDevice('{{currentNode}}', xviewmode);
} else if (args.gotonode != null) { } else if (args.gotonode != null) {
if (args.gotonode.length == 96) { args.gotonode = btoa(hex2rstr(args.gotonode)).split('+').join('@').split('/').join('$'); } // This is a HEX encoded NodeID, convert it to Base64
if (getNodeFromId('node/' + domain + '/' + args.gotonode) == null) return; // This node is not loaded yet if (getNodeFromId('node/' + domain + '/' + args.gotonode) == null) return; // This node is not loaded yet
gotoDevice('node/' + domain + '/' + args.gotonode, xviewmode); gotoDevice('node/' + domain + '/' + args.gotonode, xviewmode);
goBackStack.push(1); goBackStack.push(1);