65c65 < mdp_handle_deleted( j, post.prev() ); --- > mdp_handle_deleted( j, post );posted by azarbayejani at 11:52 AM on January 11 [2 favorites]
azarbayejani:Damn it. I spent an hour the other day trying to get it to scrape the post ID from the title div before giving up. Nice job, azarbayejani.I decided to take a look at it. The fix is very simple: link
203c203,204
< + '<div class="posttitle">' + content.title + '</div>'
---
> + '<div class="posttitle front"><a style="color: #d77 !important" href="'
> + content.url + '">' + content.title + '</a></div>'
220,221c221
< .find("div[class=posttitle]").css({
< 'color': '#f99',
---
> .find("div[class=posttitle front]").css({
(The titles in the deleted posts look the same if you set titles to be the same size as the post text like I did, so I darkened the color of the titles by #222 accordingly, like on normal posts. I had to set this rule in the anchor tag instead of the .css modifier because there's an !important rule lurking in the MeFi stylesheet, and you apparently can't (easily) apply !important to a style with jQuery. I'm not sure why the styles for the inserted content are being set via jQuery instead of just setting style attributes in the generated markup, but I'm going to leave well enough alone.) // First pass, collect all the thread objects and ids
$("div[class=copy post] span[class=smallcopy]:has(a[href*=/user/]) a:contains(comment)," +
"div[class=copy post] span[class=smallcopy]:has(a[href*=/user/]) a:contains(answer)")
to:
// First pass, collect all the thread objects and ids
$("div[class=copy post] span[class~=smallcopy]:has(a[href*=/user/]) a:contains(comment)," +
"div[class=copy post] span[class~=smallcopy]:has(a[href*=/user/]) a:contains(answer)")
(adding the two ~s).byline class is doing anything either. In the past we've often tried things out in MetaTalk that we're thinking about adding across all sites. My guess is that the class was part of a test at some point.
posted by mathowie (staff) at 10:19 AM on January 11