Skip navigation.

Ramblings

a test …

Zoom text only in web pages with Opera

, ,

Most of you are probably familiar with the zoom function of Opera. Opera lets you zoom the entire page, including pictures and flash animations, this is different from the zoom functionality other browsers have which is basically text zoom only. But how do you zoom text only in Opera?

You can of course go into Tools -> Preferences -> Advanced -> Fonts and set the Minimum font size to something appropriate so that text never gets smaller than a certain size. Mine is at 11 pixels now. But sometimes you want to zoom text on pages for small periods, or only on certain pages. The solution is a simple User Javascript.

Download the zoom-text.js script and put it any folder you prefer, I use ~/.opera/userjs/ on my Linux laptop. I have already also told Opera to run User Javascript that are located in that drawer, by going to Tools -> Preferences -> Advanced -> Content -> Javascript Options and putting ~/.opera/userjs/ in the User Javascript files field.



Now just go to any page, and you should see a little icon at the bottom right of the page. Click on this icon and you will get a box containing a "zoom in", "zoom out" and a "reset" button to play with. The script will automatically adjust the size the next time you visit the same domain to match the size you altered it to the previous visit.

Oooh green tagsPan or drag and scroll pages and images

Comments

Maulkin 9. May 2007, 06:48

Nice one!

Thank you very much!

medium 13. May 2007, 17:32

Icon for zoom is very small, but it works! K-Meleon has zoom only for text or only for images, and I love it. Opera is lacking it.
Thank you, Nicolas! :smile:

nicomen 14. May 2007, 05:44

Change these for different icon size and control size

zoomIcon.style.fontSize = "12px";
zoomControls.style.fontSize = "12px";

You can try forcing another pixel value like "20px" or play with "1em", "1.5em" or "2.5em".

If you just change the zoomIcon one, you might need to add some more space for the controls using:

zoomControls.style.margin = "0.5em";

Glad you liked it.

medium 16. May 2007, 23:33

Thank you for advice! Only at the beginning I could not notice the tiny icon, now it is okay without changes. :smile:
It is interesting: some sites automatically are unwinding the window editable for zoom without click.

nicomen 17. May 2007, 10:20

Hmm, I didn't understand that last sentence, could you rephrae it?

medium 19. May 2007, 18:21

Go, please, to this page: http://alltheweb.com/ and see, how an icon of script is preserved. :smile:
And I'm sorry for my English... :/

medium 21. May 2007, 07:32

Yes, exactly! Why? :smile:

nicomen 21. May 2007, 11:30

I don't see what's wrong with that screenshot, lol...

Ah ok, you are saying the xoom "window" pops up without you clicking it? It doesn't happen to me, hm, that's weird...

medium 22. May 2007, 12:00

Absolutely nothing wrong, interesting only! :smile:

For the accuracy: it is necessary to use the search engine and only in results of searching one can see the automatically big icon from script.

And curiosity, try to add this search engine to your set...

nicomen 24. May 2007, 10:59

Ah I reproduced it now, very strange error. Oh well I worked around it now. redownload the script please. Thanks for reporting :wink:

Anonymous 5. June 2007, 10:59

Anonymous writes:

wargamez claims there is a bug in the anonymous posting, so I apologize for abusing the comments for testing... :-)

Anonymous 5. June 2007, 11:03

Anonymous writes:

http://www.dn.no/
Your script sticks to the flash stuff also, and on the very top flash it does not work.

nicomen 5. June 2007, 12:49

It sticks to all iframes at least

Do you mean the scroll text part? Because the flash ads on the top are not own paes it seems.

If it's the scroll text part, I'm not sure I know how I should go forth to make it work in so small areas...

Anonymous 5. June 2007, 13:40

Anonymous writes:

Yes, thats what I meant :)

Anonymous 25. April 2008, 18:13

penkapp writes:

Does this work for web pages that do not use .html? It does not seem to work on pages using .php or .shtml.

nicomen 28. April 2008, 01:00

Should work on .php and .shtml pages as it checks for document.body only

Anonymous 6. April 2009, 23:23

Cihan writes:

Thanks, It works perfectly.

Anonymous 16. June 2009, 13:12

Anonymous writes:

Bless you, sir. Now I can use Opera 9.5.

Anonymous 30. June 2009, 16:37

sarylce writes:

Thank you very much. Why doesn't opera have this feature built-in like firefox? It should be built-in in future release.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

Type the two words displayed in the image below:


Smilies

Download Opera, the fastest and most secure browser
July 2009
M T W T F S S
June 2009August 2009
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31