Skip to content

Commit

Permalink
Add doubleclick to open channel
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfwithSword committed Aug 30, 2024
1 parent 95b042e commit f72f7a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,14 @@ <h1>{{heading}}</h1>
network.on("click", neighbourhoodHighlight);
{% endif %}

network.on("doubleClick", function(data) {
if (data['nodes'] != undefined) {
var url = "https://twitch.tv/" + data['nodes'][0];
window.open(url, '_blank').focus();
}

});

{% if select_menu %}
network.on("selectNode", neighbourhoodHighlight);
{% endif %}
Expand All @@ -477,7 +485,7 @@ <h1>{{heading}}</h1>
popup.className = 'popup';
popupTimeout = null;
popup.addEventListener('mouseover', function () {
console.log(popup)
//console.log(popup)
if (popupTimeout !== null) {
clearTimeout(popupTimeout);
popupTimeout = null;
Expand Down

0 comments on commit f72f7a8

Please sign in to comment.