Ive further enhanced the "make your Web browser text larger" scriptlet!

Discussion in 'iOS Apps' started by Menneisyys, Nov 29, 2009.

  1. Menneisyys

    Menneisyys Well-Known Member

    Dec 12, 2008
    1,594
    0
    36
    #1 Menneisyys, Nov 29, 2009
    Last edited: Nov 29, 2009
    I’ve further enhanced the "make your Web browser text larger" scriptlet – now, it’s 100% compatible with every page!

    You may well remember my article on making (unreadably) small characters larger. The scriptlet presented there works with most pages.

    With some, however, it results in rows without any gaps in between. An example is dealextreme.com’s product descriptions; for example, THIS. With the default charsize, they look like the following:

    [​IMG]

    After running the standard 18 point-scriptlet, the text, while indeed getting larger, becomes much harder to read:

    [​IMG]

    Now, run the following scriptlet, which increases the gap between individual rows from 100% to 150%:

    javascript:for(i=0;i%3Cdocument.getElementsByTagName('*').length;i++)void(document.getElementsByTagName('*')%5Bi%5D.style.lineHeight='150%25');

    (remove ALL spaces from the above text - they've been inserted by the forum engine)


    The results are as follows:

    [​IMG]

    Nice, eh? No more problems with the line spacing.

    This works with all the previously-ugly webpages. Happy browsing - and keep an eye out for my soon-to-be-published, brand new iPhone Web Browsing Bible!

    Note: as explained in my earlier article, you can directly paste the above scriptlet text to a new (or edited) Web browser (assuming it does support scriptets: at the time of this writing – also see the “Scriptlet support” row in THIS chart – any Safari version, iCab Mobile 2.0, Journey Web Browser 1.3, iNetDual 1.2.0, Perfect Browser 2.7 and Full Screen Web Browser 1.1.1) favorite with a simple copy/paste operation.

    (CSS / DOM freaks: don’t try using ... style='font-size: 18pt; line-height: 250%'); instead. The only browser it’ll work in is Opera and nothing else. The reason for this is explained HERE: “Styles can not be set by assigning a string to the (read only) style property, as in elt.style = "color: blue;".”)
     
  2. Menneisyys

    Menneisyys Well-Known Member

    Dec 12, 2008
    1,594
    0
    36
    UPDATE (12/01/2009): I’ve posted an entire tutorial to adding scriplets. In addition, the new article has a lot of additional goodies:
    - Find in page with Next functionality (!)
    - New versions of the lifeclever.com scriptlets deployable right on the iPhone, even in Safari
    - A complete report on all (scriptlet-capable) iPhone Web browsers’ compliance of handling purely Javascript (clickable) links (that is, ones that don’t start with http:// but with javascript: )

    Please see http://www.iphonelife.com/blog/87/complete-tutorial-video-extend-functionality-your-iphone-web-browser
     

Share This Page