I Like Big Body and I Cannot Lie August 7, 2010 3:59 PM   Subscribe

Why doesn't: javascript:void(document.body.style.fontSize='200%') increase the font size of MetaFilter pages?

I want to be able to increase the font using JavaScript bookmarklets on my iDevice and I'd really like it if I didn't have to ride the mobile.metafilter.com pony. Should I be using something other than document.body? Is there a reason I can't use document.body on the site?

Thanks!
posted by 47triple2 to Bugs at 3:59 PM (20 comments total)

You can pick your own font size in the site preferences. Or is that not what you're talking about?
posted by juv3nal at 4:30 PM on August 7, 2010


If I increase the font in my preferences then that will act across all my devices. By using the Javascript I'll be able to adjust it as I see fit. Also, you have to be logged in to adjust the font size.

So, maybe, this post should be a pony request for cookie-based preferences.
posted by 47triple2 at 4:37 PM on August 7, 2010


It's probably not working because the font size is overwritten in the span tag surrounding each post. You might be able to use Javascript DOM to over-ride it. Unfortunately, I don't know anything about how "iDevices" (presumably an iPhone) handle DOM.
posted by spiderskull at 4:41 PM on August 7, 2010


I'd stay off mobile.metafilter.com and instead just view metafilter in the mobile stylesheet, which would probably let you do stuff you want.

mobile.metafilter.com is an ugly javascript hack we did in one day two years ago and haven't touched since. The real site with a mobile sensing stylesheet is the way to go. We should really take down that old lame hobbled mobile site.
posted by mathowie (staff) at 4:51 PM on August 7, 2010


The font-size is cookie based--it's only set on login, so if you change it on one browser, you have to login in on other browsers to get the updated font size.

On my mobile browser, I have it as the plain style sheet, while my desktops I have the normal style sheet with two different font sizes.
posted by skynxnex at 4:59 PM on August 7, 2010


Matt, what is this "mobile stylesheet" of which you speak? I don't see anything in my preferences...
posted by 47triple2 at 5:16 PM on August 7, 2010


Skynxnex, I don't want to be logged on on my iPad as there are multiple users of the device. If I log in, increase my font size, then log out, I'm still stuck with the small font size.

I should have said that the magical pony this post should (?) have been about is preference setting for devices via cookies rather than by user. So, any lurkers could set their desired font size, color/plain, and other view options.
posted by 47triple2 at 5:23 PM on August 7, 2010


Matt, what is this "mobile stylesheet" of which you speak?

Just visit metafilter.com on your iPhone. You shouldn't see any graphics of any kind and a nice clean UI. If you do see a version of the real site, go down to the footer and hit the "Mobile" link to force it to the mobile stylesheet, then try your javascript font size hack.

As to what others said, I have different settings on MeFi for my desktop vs. my iPhone by just logging into my iphone and setting my prefs (which are plain text theme) and then I go to my desktop and set my prefs how I like (default color theme) and then I basically never have to refresh prefs on my iPhone so the site looks the same way forever.
posted by mathowie (staff) at 5:31 PM on August 7, 2010


Okay, I'll stick with the multiple log-in thing. :) Any chance you could make the mobile site always available or otherwise accessible from more devices than just iDevices. Like opera mini on my phone...
posted by 47triple2 at 5:53 PM on August 7, 2010


If the problem is that it gets overridden by CSS further down the line, you could always try:

javascript:void(document.body.style.fontSize='200% !important')

I don't know if you can pass "important" through js, but I would imagine so...
posted by drjimmy11 at 6:33 PM on August 7, 2010


47triple2, go to this page in Opera Mini on your phone and copy down everything after Browser:. Send it my way via MeFi Mail and I'll see if we can add it to our list of auto-detected mobile devices.
posted by pb (staff) at 6:57 PM on August 7, 2010


Browser: Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.3521/19.892; U; en) Presto/2.5.25

Thanks pb!
posted by 47triple2 at 7:14 PM on August 7, 2010


Well, apparently, I'm amazing at following instructions. :)
posted by 47triple2 at 9:15 PM on August 7, 2010


heh, no problem, got it. I added Opera Mini and Opera Mobile to the list of devices we automatically serve the mobile version to.
posted by pb (staff) at 9:19 PM on August 7, 2010 [1 favorite]


I don't see the Mobile link at all on my e72. i'm using the default Nokia browser though which is probably not the best browser ever..
posted by Xany at 9:05 AM on August 8, 2010


Xany, visit this page on your Nokia, send me the line that starts with Browser:, and I'll see if I can add it to the list.
posted by pb (staff) at 9:40 AM on August 8, 2010


Oh, this is why everything changed on my phone.
posted by ArgentCorvid at 8:56 AM on August 9, 2010


Yep, you can always scroll to the bottom of any page and click "Switch to Standard Site" to go back to the way things were.
posted by pb (staff) at 8:57 AM on August 9, 2010


Browser: Mozilla/5.0 (SymbianOS/9.3; Series60/3.2 NokiaE72-1/021.024; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) Version/3.0 BrowserNG/7.1.19424

Cheers pb!
posted by Xany at 9:02 PM on August 9, 2010


ok, BrowserNG is on the list.
posted by pb (staff) at 10:46 AM on August 10, 2010


« Older btw, I've been meaning to ask...   |   When it is too hard not to judge an AskMeFi. Newer »

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