FFixer

By Vaughan Chandler Last update Mar 9, 2011 — Installed 14,795,550 times.

Double Spaced Source Code

in
Subscribe to Double Spaced Source Code 2 posts, 2 voices



Avindra V.G. Scriptwright

Hey Vaughan,

First off, one of my favorite scripts ever. Really "fixes" up facebook very nicely. About the double spaced source.. is that intentional? If it isn't, I fixed it for you here.

(I did it with this code in firefox:

var p=document.body.firstChild;
p.innerHTML=p.textContent.replace(/\n{2,}/g,"\n");

)
I <3 JavaScript, haha ;D

-aVg

 
Vaughan Chan... Script's Author

Hi Avindra,

It's not really intentional. I always assumed it was something to do with Windows' \r\n cause I think I wrote the first version of the script back when I was still using Windows every now and then. Know that I know people actually look at the source I guess I'll try to un-double space it for the next update.

Nice code by the way. I can't believe I never knew about textContent.

Vaughan

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