Hovering over a link shows where it goes, even with the toolbar pref

This commit is contained in:
Mike
2009-06-04 11:10:39 -07:00
parent 32639c8ef3
commit 8a5b6f18c6
3 changed files with 23 additions and 7 deletions

View File

@@ -334,11 +334,15 @@ class Link(Thing, Printable):
get_domain(cname = c.cname, subreddit=False),
item._id36)
item.click_url = item.url
if item.is_self:
item.click_url = item.permalink
elif c.user.pref_frame:
item.click_url = item.tblink
item.href_url = item.permalink
else:
item.href_url = item.url
if c.user.pref_frame:
item.mousedown_url = item.tblink
else:
item.mousedown_url = None
item.fresh = not any((item.likes != None,
item.saved,

View File

@@ -44,7 +44,7 @@
<%def name="make_link(name, css_class)">
<a class="${css_class} ${ c.user_is_loggedin and 'loggedin' or ''} ${thing.clicked and 'click' or ''}"
href="${thing.click_url}"
href="${thing.href_url}"
%if thing.nofollow:
rel="nofollow"
%endif
@@ -53,6 +53,9 @@
%elif c.cname:
target="_top"
%endif
%if thing.mousedown_url:
onmousedown="this.href='${thing.mousedown_url}'"
%endif
>
${caller.body()}
</a>

View File

@@ -55,8 +55,17 @@
${optionalstyle("margin-left: 28px; min-height:32px;")}
%endif
>
<a href="${thing.click_url}" class="reddit-link-title"
${optionalstyle("text-decoration:none;color:#336699;font-size:small;")}>
<a href="${thing.href_url}" class="reddit-link-title"
${optionalstyle("text-decoration:none;color:#336699;font-size:small;")}
%if c.user.pref_newwindow:
target="_blank"
%elif c.cname:
target="_top"
%endif
%if thing.mousedown_url:
onmousedown="this.href='${thing.mousedown_url}'"
%endif
>
${thing.title}
</a>
%if not expanded: