SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jul 2011
    0 Post(s)
    0 Thread(s)

    Beginner: How to set zoom ratio for Chrome TV browser?

    From Implementation Tips - Google TV Web Developer's Guide - Google Code they give the following js snippet.

    function init() {
      var w = screen.width;
      var h = screen.height;
      var bw = window.innerWidth;
      var bh = window.innerHeight;
      var wRatio = bw/w;
      var hRatio = bh/h;
      var ratio = (wRatio + hRatio) / 2;
      document.getElementsByTagName('body')[0].style.zoom = ratio;
    Can somebody explain to me what I manipulate in the js to change the zoom ratio? I don't want my webpage for Chrome TV to zoom as much. I'm a designer and have little js experience. Thanks!
    Last edited by dwdesign; Jul 26, 2011 at 10:08. Reason: missing question mark

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts