Morgan Freeman doesn't die like the rest of us. January 11, 2013 10:14 AM   Subscribe

Using Chrome on Windows 7 with the deleted posts script installed, the title display seems to be malfunctioning to show the deleted post in between the title and the body of the non-deleted post below it.
posted by eugenen to Bugs at 10:14 AM (53 comments total) 2 users marked this as a favorite

Yeah, that's due to the changes to the front page adding titles. I contacted Plutor, who maintains the script and he said he might take a look at it later this week. If anyone can come up with a fix in the meantime, I guess feel free to post it here, but we don't have any control over the deleted posts script and can't fix it directly ourselves.
posted by mathowie (staff) at 10:19 AM on January 11, 2013


For a minute there I thought someone had made a maudlin Morgan Freeman meme about terminally ill doctors.
posted by KokuRyu at 11:06 AM on January 11, 2013 [1 favorite]


look, Morgan Freeman played God how many times, and you expect him to just up and die ? Be happy he didn't come back as a zombie.
posted by k5.user at 11:14 AM on January 11, 2013


I decided to take a look at it. The fix is very simple: link
posted by azarbayejani at 11:50 AM on January 11, 2013 [2 favorites]


Here's a diff, if you want to know just how easy it was:
65c65
<                 mdp_handle_deleted( j, post.prev() );
---
>                 mdp_handle_deleted( j, post );
posted by azarbayejani at 11:52 AM on January 11, 2013 [2 favorites]


Here's a diff, if you want to know just how easy it was

What you said does not mean what you said to me, even though I can see the difference.
posted by OmieWise at 12:26 PM on January 11, 2013 [1 favorite]

azarbayejani: I decided to take a look at it. The fix is very simple: link
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.

Now I'm looking at mdp_getcontent() and trying to decide if it's worth it to try and add the title.
posted by ob1quixote at 12:46 PM on January 11, 2013


If someone could fix the MeFi Navigator script so that it can correctly deal with the moderators' comments in MetaTalk, that would be fantastic. Right now trying to navigate from a mod's comment to another comment by the same person takes me to the FAQ - weird.
posted by exogenous at 1:09 PM on January 11, 2013


I am disapointed that the deletion reason is not "Morgan Freeman".
posted by Artw at 1:12 PM on January 11, 2013 [2 favorites]


ob1quixote - you may want to hold off on that if you're not too far, because i'm covering that.
posted by azarbayejani at 1:21 PM on January 11, 2013


Expanding on azarbayejani's extremely elegant fix, I clumsily hacked in the title to the deleted post display.
posted by ob1quixote at 1:23 PM on January 11, 2013 [1 favorite]


I had already made a gist of it and was just checking to make sure it worked more-or-less as advertised when you posted.
posted by ob1quixote at 1:26 PM on January 11, 2013


Cool! I'm working on making that transition to jQuery mentioned in the comments, of mdp_getcontent, but there are weird bugs in Safari
posted by azarbayejani at 1:37 PM on January 11, 2013


Is this a good thread to mention that the deleted posts script only works about half the time for me? Does anyone else have (a solution to) this problem?
posted by capricorn at 5:26 PM on January 11, 2013


I have this problem in that it doesn't work for MetaTalk, it only works for MetaFilter and AskMetafilter.
posted by Melismata at 6:16 PM on January 11, 2013


Isn't there a 'no deletion' policy on MetaTalk? Or is my irony meter broken?
posted by capricorn at 6:25 PM on January 11, 2013


Deletions on MetaTalk are super rare, but I know I've seen at least one.
posted by reprise the theme song and roll the credits at 8:32 PM on January 11, 2013


Yeah, they're just not very common compared to the green or particularly the blue. There's was one today (it wasn't all that exciting, don't get your hopes up) if you want to test your script.
posted by cortex (staff) at 10:00 PM on January 11, 2013


Wait, I have the deleted posts script (the original from Userscripts) and I'm not seeing the deleted MetaTalk post... the script is working on the blue though...
posted by IndigoRain at 4:18 AM on January 12, 2013


capricorn: Is this a good thread to mention that the deleted posts script only works about half the time for me? Does anyone else have (a solution to) this problem?

There's a known limitation to the script that there has to be a successful post made after the deleted thread before the deleted thread will show up. Is that what you are referring to?
posted by Rock Steady at 7:24 AM on January 12, 2013


I should be clearer; I mean you can check to see if the script you're using happens to work on Metatalk as a matter of curiosity (to answer the question "does this script happen to work for Metatalk"), not that you should check against Metatalk to see if there's a problem with the script.
posted by cortex (staff) at 7:33 AM on January 12, 2013


Rock Steady: There's a known limitation to the script that there has to be a successful post made after the deleted thread before the deleted thread will show up. Is that what you are referring to?

I don't think so. I mean that it's a toss-up as to whether my browser will behave as though the script is not installed. I'm using Tampermonkey in Chrome, so if it's not designed for my browser, then fair enough.
posted by capricorn at 7:38 AM on January 12, 2013


Here's an updated version of the script that should treat titles properly. Thanks to not_on_display and mathowie for pinging me, and to azarbayejani and ob1quixote for making first passes at a fix. (And the rest of you for your patience.)

Userscripts.org appears completely dead, and I was never adequately satisfied with gitorious as a new site for my scripts. I guess I'll probably end up moving them all to plutor.org, since there's no simpler solution. But for now, they're kinda missing from the Internet.
posted by Plutor at 12:24 PM on January 12, 2013 [11 favorites]


Those of you experiencing weird edge case behavior (capricorn, IndigoRain), I recommend upgrading. Lots of people are running old versions (for instance, ob1quixote's patch was on an older version) and they used to do some dumb things.
posted by Plutor at 12:26 PM on January 12, 2013


cortex: "I should be clearer; I mean you can check to see if the script you're using happens to work on Metatalk as a matter of curiosity (to answer the question "does this script happen to work for Metatalk"), not that you should check against Metatalk to see if there's a problem with the script."

Well if we're all using the same script and they're all seeing it and I'm not...

Plutor, I just installed the version you posted and still don't see the deleted MeTa thread. I'm not particularly worried about it since it works on the Blue and Green, but just pointing it out.
posted by IndigoRain at 1:03 PM on January 12, 2013


Thanks for the script update, Plutor.
posted by pb (staff) at 2:43 PM on January 12, 2013


I may be an idiot. How do I add Plutor's script update in Chrome? I don't see an 'options' button next to Deleted Scripts in Manage Extensions.
posted by kittensofthenight at 6:04 PM on January 12, 2013 [1 favorite]


I'm having difficulty getting it installed in Firefox myself.
posted by JHarris at 6:18 PM on January 12, 2013


Thirding the difficulty with installation. When I click the installation link on Plutor's site, I just get the script's source code in my browser window.
posted by Scientist at 7:55 PM on January 12, 2013 [2 favorites]


In Firefox Greasemonkey, if you already have the script installed, you can just click Edit Script and then copypaste Plutor's script in place of what's there. That's what I did.
posted by IndigoRain at 9:14 PM on January 12, 2013


But, in chrome, it seems to be more complicated than that.
posted by Obscure Reference at 12:26 AM on January 13, 2013


What do I have to tweak in the deleted post script to get titles of deleted posts to match my font preferences for other titles?
posted by radwolf76 at 1:17 AM on January 13, 2013


OK, Chromies: Step one, save the source from Plutor.org
I named it 809.user.js because that was the name of the original script, but I imagine anything ending with .user.js would work. (I imagine, but didn't actually try this.)
Step two, open your chrome extensions page. (I give the link assuming you're using chrome at the moment.)
Step three, drag your saved script to your open extensions page.
posted by Obscure Reference at 7:48 AM on January 13, 2013 [1 favorite]


Thanks for all the hard work, Plutor! I installed the new version and it still wasn't working, but I switched my userscript manager from Tampermonkey to Blank Canvas and now it's fine. So I'd recommend the same for other Chrome users having issues.

Also, I just want to mention here that the Metafilter mods are awesome for encouraging the existence of this script and in general the user-side modification of the site. Something like this could justifiably be looked upon by mods with disdain or anger, but you guys are too cool for that.
posted by capricorn at 9:11 AM on January 13, 2013


Call me crazy, but if we have so much demand for restoring deleted posts that someone wrote a plugin to do it - Why doesn't MeFi just close, rather than delete, threads?

This seems curiously apropos to this thread that just got deleted for focusing on the NYT-disallowed-comments angle rather than on the far more delicate underlying story. Perhaps the MeFi community wants to have that discussion, and the FP poster didn't merely miss his intended target?

That said, I can see (with the link I just posted) the difficulty of discussing censorship with a background topic of implicit racism; but put bluntly, no one censors discussions about the weather.

Well, okay, Fox News does, but they don't count. ;)
posted by pla at 9:25 AM on January 13, 2013


Call me crazy, but if we have so much demand for restoring deleted posts that someone wrote a plugin to do it - Why doesn't MeFi just close, rather than delete, threads?

Because the two approaches serve different goals.

We have no problem with folks who want to go DIY-spelunking for deleted posts doing so; we include deletion reasons in part because we made the decision a long time ago that having some transparency about what stays and what goes and why was a good thing. There's a lot of sharp-eyed, engaged members here who like having a sense of what's going on on the site to that degree, and that in turn can sometimes help inform self-policing and metatalk discussions and so forth.

But we don't just close and leave visible the problematic threads because the front page of Metafilter gets read by a lot more folks than just that highly-engaged subset of the community, and for the majority of folks not interacting to that degree just closing a thread that seems like it needs deleting is tantamount to doing nothing. Making a deleted thread not casually, trivially part of the view of the front page is the main point of deleting it, to keep the front page looking more like how we feel the guidelines and spirit of moderation suggest it should look.
posted by cortex (staff) at 10:00 AM on January 13, 2013 [1 favorite]


Call me crazy, but if we have so much demand for restoring deleted posts that someone wrote a plugin to do it - Why doesn't MeFi just close, rather than delete, threads?

My post's deleted,
But just mabye,
You can find it by post number,
So call me crazy?
posted by radwolf76 at 11:36 AM on January 13, 2013


There's still a couple minor bugs in Plutor's script. 1) It doesn't apply your title settings to the deleted post titles, and 2) it doesn't link to the post in the title. Here's a diff for the fix:
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.)
posted by neckro23 at 11:54 AM on January 13, 2013 [1 favorite]


Here's a diff for the fix

That sounds like what I'm looking for, thanks. As soon as I can get back to my browser that has the script installed, I'll give that a try.
posted by radwolf76 at 12:25 PM on January 13, 2013


Nice work neckro23. Working fine for me now.
posted by radwolf76 at 5:26 PM on January 13, 2013


I thought I'd give the new deleted post userscript Plutor posted a try, and so I wrapped it up as a Safari extension. When testing that I'd done that correctly, I also noticed that it wasn't working on MetaTalk, as mentioned above. A little digging, and it turns out that the script is looking for a span with the class smallcopy. However, on MeTa (but not MeFi or AskMe), the appropriate span has both smallcopy and byline as it's class. A quick fix is to change the lines:
    // 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).

I'm curious why the byline class is only used on MeTa, as it doesn't appear to actually do anything.
posted by JiBB at 1:23 AM on January 14, 2013


I don't see that the 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 pb (staff) at 7:01 AM on January 14, 2013


I'm having a tough time with this one on Firefox using Greasemonkey. Don't ask too many questions, but it now seems I have to start from scratch with the Mefi Deleted Posts script. Can someone explain to me like I'm their Luddite grandmother how to get this working?
posted by too bad you're not me at 7:01 AM on January 14, 2013


I'm having troubles with firefox and greasemonkey too. If I go to options and click "edit this user script" I get a file selection window that only accepts .exe and .com files..
posted by royalsong at 7:13 AM on January 14, 2013


In FF I just deleted the old script, restarted, and reinstalled the new one.
posted by Room 641-A at 8:14 AM on January 14, 2013


Ah I figured out what was going on. Greasemonkey won't read it as a greasemonkey script unless the file name ends exactly with: .user.js. Plutor's ends with .user_1.js

1. Download the .js file
2. rename to mefi_deleted_posts.user.js
3. Open notepad
4. Go here and copy the text into notepad.
5. Save the notepad file as mefi.html in the same folder that you downloaded the .js file to. (It's important that this file's extension is .html and not .txt)
6. Open mefi.html in firefox and click the link

Greasemonkey should automatically detect it and ask if you want to install it.
posted by royalsong at 8:52 AM on January 14, 2013 [5 favorites]


Royalsong, your fix worked. Thanks a bunch!
posted by too bad you're not me at 1:32 PM on January 14, 2013


Thanks, royalsong, you're my hero(ine)!
posted by deborah at 11:08 PM on January 14, 2013


Obscure Reference: "OK, Chromies: Step one, save the source from Plutor.org
I named it 809.user.js because that was the name of the original script, but I imagine anything ending with .user.js would work. (I imagine, but didn't actually try this.)
Step two, open your chrome extensions page. (I give the link assuming you're using chrome at the moment.)
Step three, drag your saved script to your open extensions page.
"

So I tried that and get a "Drop to Install" message as I drag the file over the Extensions page but when I drop it, the .js file just opens in the browser and doesn't install. This is Chrome on Windows 7.
posted by octothorpe at 8:24 AM on January 15, 2013


I implemented the various fixes in this thread, if anyone else wants them. The script is re-titled "Mefi deleted posts fix", so you should disable "Mefi deleted posts" if you want to use this one instead:

http://lowkey.org/mefi_deleted_posts_fix.user.js
posted by team lowkey at 3:40 PM on January 15, 2013 [3 favorites]


Ahh, I didn't read up far enough down. Royalsong's fix worked for me. I'm really starting to not like Chrome.
posted by octothorpe at 6:25 PM on January 15, 2013


Yeah, it looks like Wordpress doesn't cooperate well with *.user.js files. I've updated the version on plutor.org, but the link doesn't work any better than before. Sigh.
posted by Plutor at 5:40 AM on January 16, 2013


Looks like you still have ".user_.js", rather than ".user.js".
posted by team lowkey at 11:51 AM on January 16, 2013


« Older Swap Me Maybe?   |   Name that awkward computer scientist! Newer »

You are not logged in, either login or create an account to post comments