[Greasemonkey] DOM question: figuring out how wide a page is

Julien Couvreur julien.couvreur at gmail.com
Fri Apr 29 11:36:25 EDT 2005


I'm looking into writing a generic user script that would help me fit
pages on my Tablet PC screen in slate mode (768*1024 instead of the
opposite). But a number of pages have hardcoded width, instead of
being fluid.
http://www.dehora.net/journal/2005/04/rsq_really_simple_querying.html
is an example (with width=1000px on some elements).

My problem is two-folds:
- I couldn't find a way of detecting that the page is currently too
wide for my display (and thus creates a horizontal slide bar). Any
ideas?
- Is there something similar to the DOM but to navigate/edit the CSS? 

Thanks,
Julien


More information about the Greasemonkey mailing list