Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)

TorgoX
  sburkeNO@SPAMcpan.org
http://search.cpan.org/~sburke/

"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Saturday December 31, 2005
06:13 AM

GreaseMonkey extension: Text-size defaulter

[ #28186 ]
Dear All,

Six months ago, I wrote a GreaseMonkey extension: Text Size Defaulter.

It's meant for use on web sites with insanely small type, as often happens when WEB DESIGN GURUS set their pages' text sizes to "font-size: 10px", which happens to look good for them with their monitors and monitor resolutions (and their designerly disinterest in actual content), but look like tiny little squiggles to me and my particular screen/cornea/retina geometry. However, that user-script would work when the text-sizes were set in actual style sheets, but would fail when it was set in style="..." attributes, and a few other circumstances besides -- this was because it worked only by simple CSS rule injection.

But now I've rewritten it! Now it actually traverses the whole doctree and absolutely enforces a single text size (the browser's default size, in fact) on every single node in the tree, dammit.

There's still a circumstance where it doesn't work: when text is added to the page after it's initially finished rendering. In my experience, however, such things happen only with DOM-generated menu items, where I don't entirely mind the text being too small.

By a stroke of irony, the new version of Firefox has solution to much of my problem-space, in the form of the "minimum font size" setting under Preferences: Content: Fonts & Colors: Advanced, (a.k.a. "font.minimum-size.x-western" in about:config). This defaults to None, but you can merrily set it to me a bit smaller than the normal font size.

However, there's two cases that my plugin catches: 1) situations where you want the font-size restriction to be site-specific (whereas the Preferences thing is global), and 2) situations where the problem isn't overly-small text, but overly-large (whereas there's no maximum font size prefs).

Enjoy!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.