Font size bookmarklets

Last night I was reading some online documentation on Safari on my iPad and was annoyed by the small font size. On most web sites, the text is formatted in narrow columns and you just double tap to zoom in perfectly. In this case that wouldn’t work well because the text spans from edge to edge on the site. You’ve probably bumped into a similar situation on your iPhone or iPad.

This morning I looked around for a solution. I didn’t find exactly what I was looking for ; but I combined and modified some of the things I found and created two bookmarklets: one that increases the font size of the page you are in, and one that decreases it.

There are two ways to install them.

Method A

If you use iCloud to synchronize bookmarks between Safari on your Mac or PC and your iPhone/iPad, then the easiest way is to do this from your computer. Just drag the two links below to your Bookmarks Bar.

Let iCloud take care of the syncing for you.

Method B

If you need to do this from your iPhone/iPad because you don’t use iCloud for syncing bookmarks, then things are a little harder. I won’t describe the process here because others have already done a great job. The only difference is that you will use the code from my bookmarklets:

Font-:

javascript:var p=document.getElementsByTagName('*');for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}s-=2;p[i].style.fontSize=s+"px"}

Font+:

javascript:var p=document.getElementsByTagName('*');for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}s+=2;p[i].style.fontSize=s+"px"}

Once you have installed the bookmarklets, use them the same way you use a bookmark. I recommend putting them on the Bookmarks Bar for quick access, as shown:

Bookmarklets on iPad

This is how the original website looks:

Original font size

And this is how it looks after increasing the font size a couple of times:

After increasing the font size using the bookmarklet.

In order to reset the font size back to its default, just reload! Hope you find this useful.

Share:
  • del.icio.us
  • Facebook
  • Twitter
  • Digg
  • email
This entry was posted in Reality Distortion Field and tagged , , , , , . Bookmark the permalink.

20 Responses to Font size bookmarklets

  1. Alejandro says:

    This is by far the most useful post I have seen on this blog for years. I have also often been frustrated with small fonts in a small screen, and could not believe that the supposedly super user-friendly iOS couldn’t do anything about it. I don’t use iCloud, so I had to do it the ‘hard’ way, but even that was easy enough. Thanks!

  2. Pingback: Change the Font Size of Web Pages in Safari for iOS with Bookmarklets

  3. Pingback: » Change the Font Size of Web Pages in Safari for iOS with Bookmarklets »

  4. Pingback: iOS: De testgrootte in Safari aanpassen | Appletips

  5. Pingback: IphoneBreak.INFO » How to use bookmarklets to adjust font sizes in mobile Safari

  6. Pingback: How to use bookmarklets to adjust font sizes in mobile Safari | Random Smart Stuffs

  7. Pingback: iPad-Tipp: Schriftgröße in Safari durch Bookmarklets ändern | ifun.de

  8. Pingback: Change the Font Size on iPhone and iPad Web Sites with Bookmarklets [Bookmarks] « « ScannableMedia ScannableMedia

  9. Pingback: Change The Font Size On iPhone And iPad Websites With Bookmarklets | Lifehacker Australia

  10. Pingback: Bookmarklet ändert Schriftgröße auf Webseiten – iPhoneBlog.de

  11. Pingback: Change the Font Size on iPhone and iPad Web Sites with Bookmarklets [Bookmarks] - Heat Mobile

  12. soub says:

    Very nice Marcos,

    I modified your code (as a function) to be used in Firefox. It is very cool. It should work in other browsers too.

    Font++
    javascript:(function(){var p=document.getElementsByTagName(‘*’);for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}s+=2;p[i].style.fontSize=s+"px"}})()

    Font–
    javascript:(function(){var p=document.getElementsByTagName('*');for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}s-=2;p[i].style.fontSize=s+"px"}})()

    As you must know, you can just do the same in Firefox and others browsers in websites that has been built with accessible options without specials tricks. Readers can look at
    http://www.w3.org/WAI/changedesign

    Best regards,
    Soub

  13. Pingback: Change the font size of a Web page on iOS « « ScannableMedia ScannableMedia

  14. Pingback: Cambiar el tamaño de la fuente de las páginas web en Safari para iOS | SomosIphone.com

  15. Pingback: Inception 202 » Blog Archive » Change the font size of a Web page on iOS

  16. Pingback: How to Adjust Font Size of Web Pages in Safari for iOS - Cellularism

  17. Pingback: iOS Safari Bookmarklet: Schriftgröße auf Webseiten ändern | iOS-Newz

  18. Pingback: Change the font size of a Web page on iOS | Geent.net

  19. Pingback: Apple S.W.A.T. Blog » Bookmarklet ändert Schriftgröße auf Webseiten

  20. Pingback: Change the font size of a Web page on iOS | Tips World, Tips Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>