mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-09 05:34:05 +02:00
Add a delay to link expansion and fix tooltip issues
This commit is contained in:
parent
eccd37a3eb
commit
b8a5c2fb9b
Resources
@ -223,13 +223,15 @@
|
||||
}
|
||||
|
||||
if ($TD.expandLinksOnHover){
|
||||
var expanded = me.attr("data-full-url");
|
||||
expanded = cutStart(expanded,"https://");
|
||||
expanded = cutStart(expanded,"http://");
|
||||
expanded = cutStart(expanded,"www.");
|
||||
|
||||
me.attr("td-prev-text",text);
|
||||
me.text(expanded);
|
||||
tooltipTimer = window.setTimeout(function(){
|
||||
var expanded = me.attr("data-full-url");
|
||||
expanded = cutStart(expanded,"https://");
|
||||
expanded = cutStart(expanded,"http://");
|
||||
expanded = cutStart(expanded,"www.");
|
||||
|
||||
me.attr("td-prev-text",text);
|
||||
me.text(expanded);
|
||||
},200);
|
||||
}
|
||||
else{
|
||||
tooltipTimer = window.setTimeout(function(){
|
||||
@ -247,8 +249,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
window.clearTimeout(tooltipTimer);
|
||||
|
||||
if (tooltipDisplayed){
|
||||
window.clearTimeout(tooltipTimer);
|
||||
tooltipDisplayed = false;
|
||||
$TD.displayTooltip(null,false);
|
||||
}
|
||||
|
@ -50,13 +50,15 @@
|
||||
}
|
||||
|
||||
if ($TD.expandLinksOnHover){
|
||||
var expanded = url;
|
||||
expanded = cutStart(expanded,"https://");
|
||||
expanded = cutStart(expanded,"http://");
|
||||
expanded = cutStart(expanded,"www.");
|
||||
tooltipTimer = window.setTimeout(function(){
|
||||
var expanded = url;
|
||||
expanded = cutStart(expanded,"https://");
|
||||
expanded = cutStart(expanded,"http://");
|
||||
expanded = cutStart(expanded,"www.");
|
||||
|
||||
e.currentTarget.setAttribute("td-prev-text",text);
|
||||
e.currentTarget.innerHTML = expanded;
|
||||
e.currentTarget.setAttribute("td-prev-text",text);
|
||||
e.currentTarget.innerHTML = expanded;
|
||||
},200);
|
||||
}
|
||||
else{
|
||||
tooltipTimer = window.setTimeout(function(){
|
||||
@ -77,8 +79,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
window.clearTimeout(tooltipTimer);
|
||||
|
||||
if (tooltipDisplayed){
|
||||
window.clearTimeout(tooltipTimer);
|
||||
tooltipDisplayed = false;
|
||||
$TD.displayTooltip(null,true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user