From 639ed9361e24dfb2eb20bbb2bb0fee812e2f91e2 Mon Sep 17 00:00:00 2001 From: Eduardo Mozart de Oliveira <2974895+eduardomozart@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:32:48 -0300 Subject: [PATCH] Improve compatibility with Read the Dokus template Add data-wiki-id attribute that is used by DokuWiki "Read the Dokus" template to navigate between pages. --- scripts/indexmenu.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/indexmenu.js b/scripts/indexmenu.js index d9b8d61..0f71a46 100644 --- a/scripts/indexmenu.js +++ b/scripts/indexmenu.js @@ -316,10 +316,11 @@ dTree.prototype.node = function (node, nodeId) { (node.hns) ? str += node.hns : str += node.dokuid; str += '"' + ' title="' + node.name + '"' + jsfnc; str += ' onclick="javascript: ' + this.treeName + '.s(' + nodeId + ');"'; + str += ' data-wiki-id="' + node.dokuid + '"'; str += '>' + node.name + ''; } else if (node.pid !== this.root.id) { - str += '' + node.name + ''; + str += '' + node.name + ''; } else { str += node.name; }