From cdb709fe94f4abe050e51be1a4c7ed0f9d115e9a Mon Sep 17 00:00:00 2001 From: JBenda Date: Fri, 24 Jul 2020 18:34:21 +0200 Subject: [PATCH] Make Hover clickable + remove debug output --- firefox/window.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox/window.js b/firefox/window.js index 71d1698..8ecffcd 100644 --- a/firefox/window.js +++ b/firefox/window.js @@ -7,7 +7,6 @@ function addHover(node) { link = node.attributes.getNamedItem('bookmark'); } if(link) { - console.log('hit') span = document.createElement("span"); span.classList.add('tooltiptext'); text = document.createTextNode(link.value); @@ -18,6 +17,7 @@ function addHover(node) { const bb = span.getClientRects()[0]; span.style.left = (rect.x + rect.width/2 - bb.width/2)+'px'; span.style.top = (rect.y+rect.height/2 - bb.height/2)+'px'; + url = (' '+ link.value).slice(1); // deep copy node.addEventListener('mouseover', function(){ span.timer = setTimeout(function() { span.style.visibility="visible"; @@ -36,7 +36,7 @@ function addHover(node) { } }) span.addEventListener('click', function(){ - wopen(link.value); + wopen(url); }) }