Facebook Purity update

in
Subscribe to Facebook Purity update 7 posts, 3 voices



Ben Krasnow Scriptwright
FirefoxWindows

I noticed that this greasemonkey script would sometimes not block 3rd party apps and other times would only block the footer of such 3rd party apps. I played around with it for a while, and ran the greasemonkey script on local html that I saved directly from facebook. The local copy was filtered perfectly while the live html from facebook had problems with apps not being filtered. After more debug statements, I think the greasemonkey script was not running at the proper time in the page load sequence. All greasemonkey scripts will run after the page loads, so there is no need for an addeventlistener('load'....

I modified the script by commenting the first two lines:

//window.addEventListener('load',
//function () {

and the corresponding last two lines:

//}
//, true);

So far, this change has worked perfectly for me.

 
Ben Krasnow Scriptwright
FirefoxWindows

I got my inspiration for this fix here:
http://stackoverflow.com/questions/72090/how-to...

 
Dink Scriptwright
FirefoxWindows

Awesome Fix, Ben!!!
Works for me!!

 
steeev Script's Author
FirefoxWindows

ben, its strange, as i am not seeing the abnormal behaviour you are seeing.
btw i added the event listener for compatibility with other browsers, as the sequence of running greasemonkey scripts is different in chrome, safari + opera. maybe i will put in a conditional statement that will only add the event listener if the user is running a non firefox browser...

 
steeev Script's Author
FirefoxWindows

i had an idea as to what some peoples problem might be, you might have more than one version of the script running at the same time, this could cause the behaviour you are seeing, you can check this, by going to the Tools/Greasemonkey/Manage UserScripts menu, if you have more than one version of facebook purity listed there, uninstall the older versions, and you should be good to go. btw dont forget to update the script to the latest version.

 
Ben Krasnow Scriptwright
FirefoxWindows

Steeev, I think you were right about the multiple versions of FB Purity. The list of scripts got a little long, and the name of FB purity was shortened at some point, so I didn't notice the duplicate. It looks like the latest FB code change is this:

Old:
var footernodes=thenode.getElementsByClassName('UIIntentionalStory_AttachmentInfo');

New:
var footernodes=thenode.getElementsByClassName('UIIntentionalStory_Info');

Also, perhaps caused by the FireFox 3.5 upgrade, the javascript:; href in the "hide" link causes firefox too try loading a page or directory called javascript. I replaced it with a hash sign:

fbpurityinfo.innerHTML='FB Purity blocked: 0 app msgs [ Show ]';

I have no idea if this is proper....

 
Ben Krasnow Scriptwright
FirefoxWindows

Ooops, my code was actually interpreted as HTML in the previous posting. Although, tt looks like you've already updated the code to fix the FB class change as well as the nowhere link, so good on you! Thanks so much for writing this script! I can't believe the guys at Facebook haven't realized so many people want a checkbox for "stupid space-wasting quizzes that annoy the crap out of everyone."

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel