Get your own customer support community
 

Don't expand urls that aren't shortened

On digg.com, links that point to regular digg pages (not the new short url service) get treated like short urls and the tooltip appears. I replaced the line

tooltip(data.long_url);

with

if (anchor.href !== data.long_url) {
tooltip(data.long_url);
}
else {
tooltip(false);
}

The code ignores the link if the original is the same as the shortened (when pointing to a non-short url) and removes the exisiting tooltip.
There might be a better way to go about this since the tooltip still appears saying "Expanding..." but this is the best I came up with off the top of my head just now.
Other ideas were to ignore the link if it was longer than a certain length or to use a regexp to determine whether the link points to a regular page or a short url.
It's not a huge problem but it's still a minor inconvenience to have tooltips popping up everywhere and it should be a reasonably easy fix.
Good work so far!
Inappropriate?
1 person likes this idea

The company implemented this idea.


User_default_medium