summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'main.js')
-rw-r--r--main.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.js b/main.js
index 74d3bd4..a8dcdde 100644
--- a/main.js
+++ b/main.js
@@ -432,7 +432,16 @@
'border': 'solid 2px white',
'border-radius': '5px'
});
- balloon.append(JSON.stringify(candidateNode).replace(/,/g, ',<br />'));
+ balloon.append($('<h1>').text(candidateNode.data.name));
+ if (!candidateNode.data.main) {
+ var switchLink = $('<a>').attr({
+ 'href': '#',
+ 'data-link': candidateNode.name
+ });
+ switchLink.text('[go!]');
+ switchLink.click(switchContext);
+ balloon.append(switchLink);
+ }
balloon.hide();
$('body').append(balloon);
balloon.data('node', candidateNode);