FFixer

By Vaughan Chandler Last update Mar 9, 2011 — Installed 15,191,610 times.

Suggestion: stretch homepage to fill margins

in
Subscribe to Suggestion: stretch homepage to fill margins 19 posts, 5 voices



jsb User
ChromeWindows

Awesome script! Came here looking for some quick fixes after the latest facebook changes, and have found literally dozens of features I never knew I needed, but now can't live without! I'm amazed at the amount of thought you have put into this. And I love that your code is so beautifully crafted and easy to read.

Anyway, my suggestion: You have the option to left-align the feed, but this isn't that useful because it just moved the whitespace all over to the right side. Better would be to replace this with an option to "Stretch the home page to fill the margins".

I implemented this as follows (at line 1738 in the current beta version):

	// Left and right align the home page content
	if (prefs['HomeLeftAlign']) {
 		addStyle('.UIFullPage_Container, .UIOneOff_Container { margin:0 ! important; width:98%; }');
		addStyle('#fb_menubar { width:100%; }');
		addStyle('#pagefooter { width:98%; }');
		var adjWidth = document.body.clientWidth - 40;
		if ($('home_sidebar').clientWidth) adjWidth -= ($('home_sidebar').clientWidth + 30); 
		addStyle('#home_left_column { width:' + (adjWidth) + 'px ! important; }');
		if ($('home_filter_list').clientWidth && !prefs['MoveFilterList']) adjWidth -= ($('home_filter_list').clientWidth + 25); 
		addStyle('#home_stream { width:' + (adjWidth) + 'px ! important; }');
		addStyle('.commentable_item .ufi_section {width:100% !important; }');
	}

 
Vaughan Chan... Script's Author
FirefoxX11

Glad to hear you like the script :)

I like the idea, I'll include it in the next release, but as a separate option from left-align. Thanks for the code.

By the way, if I remember correctly the idea behind the left-align was actually to create that whitespace on the side, as the person who requested wanted to keep their buddy list open without blocking the other content on the home page.

 
jsb User
ChromeWindows

Yup, always a good idea to maintain backward compatibility. That would be great if you could slot it in as a new option - thanks! Hopefully you'll have time to review the code, as I'm completely new to this and don't really know what I'm doing.

 
jsb User
ChromeWindows

One more tweak that would make this even better (or perhaps should be a separate option) would be to automatically expand all the "read more..." links. These usually tend to hide only a few words at the end of a post, which is very annoying, and on a big monitor with the feed stretched to te full width there is plenty of real estate to display the full text of all posts.

 
Balki Bartok... User
FirefoxWindows

Another great suggestion by jsb. We certainly do think alike. I hate having to always click read more. I don't know why FB doesn't just put these options in the website and allow the user to choose what they want to do!

 
Vaughan Chan... Script's Author
FirefoxX11

Somehow I can't find any of the "read more" links right now, but when I do I'll see how easy this would be to implement.

 
jsb User
ChromeWindows

Vaughan - To test it, you could just post a long status to your own profile and then a really long comment under that. Just needs to be longer than about 300 characters (or I think 400 for comments). You could delete it when you're done. :)

Here's some sample text that should be long enough:
testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing

 
Vaughan Chan... Script's Author
FirefoxX11

The latest test version (which can be found here) adds the ability to stretch the home page and auto click on "read more" links. (I only tested the "read more" feature with one link that I found, so let me know how it works)

 
jsb User
ChromeWindows

Stretching and auto-clicking "read more" both seem to be working great on Firefox with GreaseMonkey. Unfortunately the "read more" links are not expanding in Google Chrome. I had not noticed any problems with previous features in Chrome.

 
Vaughan Chan... Script's Author
FirefoxX11

Hmm... I wonder if Chrome is being served different HTML than Firefox for those links, cause the code for that is pretty simple. Next time you see one of those links in Chrome, can you check out the code used to make it? In Firefox theres a SPAN tag with a class name of "text_exposed_link" that the link is contained in, and the link has an "onclick" attribute set.

 
jsb User
ChromeWindows

I checked and the HTML is identical in the two browsers. When I get some time, I will try debugging the script in Chrome.

 
jsb User
ChromeWindows

In Chrome, it's making it into the click() function for each of the "Read more" links, but the click event is not firing correctly. Interestingly, I found that if I comment out the code that handles the mousedown event, it works perfectly. Hope this helps...

 
MysticMetal User
FirefoxWindows

I think it would also be very good if you could remove the "read more" text that gets copied if you copy the information to the clip board... (select the text that you have expanded, copy it, and then paste it somewhere else and you'll see "read more" in the text...). Would it work to just remove the html for it after it's clicked?

 
David C User
FirefoxWindows

I liked this feature very much because my browser window is usually narrow because i use the windows side bar thing. Normally i'd have to scroll a little horizontally to see some of the content, but this feature fixes that prob. for me. Only prob is the content on the right will move to the bottom of thepage if the font size gets too big, but it isn't a problem.
Thanks again.

~Des

 
jsb User
ChromeWindows

Vaughan, thanks for the new 2.0.0rc version. Took a quick look and it seems to be working well. Unfortunately recent facebook changes have slightly messed up the stretch feature. The Comment box is now pushed off to the right. I'll investigate a fix when I get some time if you don't get to it first.

 
Vaughan Chan... Script's Author
MozillaX11

@jsb - At a quick glance with Firebug it seems to be caused by a "float:right" in the CSS. Once thats disabled its just a matter of adjusting the width (although I guess adjusting the width alone would be enough). If I write the code before I hear back from you I'll let you know so you don't waste time working on it.

@David - Glad to hear you like it :) I'll see if I can get that problem solved.

 
jsb User
ChromeWindows

Vaughan - Were you waiting for me to get back to you on this? Sorry, I've been busy lately so I didn't get a chance to look at it. Sounded like you had a simple fix, so I just wanted to remind you in case you forgot about it. (Doesn't seemed to be corrected in the latest test release.) Thanks!

 
Vaughan Chan... Script's Author
ChromeX11

Hi jsb, I wasn't waiting and I haven't forgotten, just haven't had much time lately to work on the script. Before the next stable release I'll test all the features to see how they're working, including this one.

 
jsb User
ChromeWindows

Also, the "read more" option has stopped working, probably because facebook changed it to "show more". So perhaps when you are re-aligning the comment box you could try to fix this too. Thanks!

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