Saturday, June 14, 2008

Reformatting the Economist web page to fit small screens

I've been a reader of the Economist magazine, using the Opera browser on my Nokia 770 Internet tablet. The recent changes in the layout of the page introduced the need for horizontal scrolling when zooming the view to make the fonts larger. This affects the usability quite severely.

I implemented a workaround for that, as a bookmaklet which increases the font size of the main pane without increasing its width, so the content reflows nicely within the screen bounds.

Here's the code; add it as the "url" field in your bookmark, then simply load the bookmark once you're on the page you want magnified.

javascript:function k34(){c = document.getElementById('content'); d=c.getElementsByTagName('div');for(i=0;i<d.length;i++){
if(d[i].className=='col-left'){d[i].style.fontSize='x-large';break;}}}; k34();


Note: this should be a single line, no breaks

No comments: