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!
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!
1
person likes this idea
I like this idea!
Tell me when this idea gets some attention.
The more people who like this idea, the more it gets noticed.
The more people who like this idea, the more it gets noticed.
The company implemented this idea.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Thanks. This will be fixed in the next version of the extension to be released soon.
The company thinks
this is one of the best points
Loading Profile...



EMPLOYEE