FullScreen for the Old Reader

It's a bookmarklet for The Old Reader, the best alternative of the Google Reader. It can toggle the interface of your Old Reader just like the fullscreen feature of Google Reader with one click.

Here is the JavaScript code:

javascript:(function(){var v=new RegExp('theoldreader.com');if(!v.test(document.URL)){alert('The script can only work in theoldreader.com!');}else{a=document.getElementById('main');b=document.getElementById('sidebar');c=document.getElementsByClassName('subscribe-fixed-top');d=document.getElementsByClassName('navbar-fixed-top');e=document.getElementsByClassName('container-fluid');if(typeof top == 'undefined'){var top='';}if('none' != b.style.display){top=window.getComputedStyle(e[0],null).getPropertyValue('top');e[0].style.top='5px';left=a.style.left;width=a.style.width;b.style.display='none';c[0].style.display='none';d[0].style.display='none';a.style.left='-25px';a.style.width='99%';}else{b.style.display='block';c[0].style.display='block';d[0].style.display='block';e[0].style.top=top;a.style.left=left;a.style.width=width;}return;}})();

PS: You can copy this code and paste it on your browser's bookmarks bar. Or just try dragging the fonts below.

And here is simple comments:

//a means main body that display the real entities.
//b means the sidebar on the left.
//c means the add subscription button.
//d means the header in the top
//e means the container of the main(a), the sidebar(b) and the ADD BUTTON(c).

I just test the code in chrome and IE 10.

No comments:

Post a Comment