1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-28 08:34:06 +02:00

Fix link expansion in notification popup

Closes 
This commit is contained in:
chylex 2016-06-22 17:42:13 +02:00
parent 49f12abeb3
commit 44ccaa0d26

View File

@ -40,10 +40,12 @@
var tooltipTimer, tooltipDisplayed; var tooltipTimer, tooltipDisplayed;
addEventListener(links,"mouseenter",function(e){ addEventListener(links,"mouseenter",function(e){
var url = e.currentTarget.getAttribute("data-full-url"); var me = e.currentTarget;
var url = me.getAttribute("data-full-url");
if (!url)return; if (!url)return;
var text = e.currentTarget.textContent; var text = me.textContent;
if (text.charCodeAt(text.length-1) !== 8230){ // horizontal ellipsis if (text.charCodeAt(text.length-1) !== 8230){ // horizontal ellipsis
return; return;
@ -56,8 +58,8 @@
expanded = cutStart(expanded,"http://"); expanded = cutStart(expanded,"http://");
expanded = cutStart(expanded,"www."); expanded = cutStart(expanded,"www.");
e.currentTarget.setAttribute("td-prev-text",text); me.setAttribute("td-prev-text",text);
e.currentTarget.innerHTML = expanded; me.innerHTML = expanded;
},200); },200);
} }
else{ else{