code: function setLogVisibility (visible) {
      if (visible) {
          document.querySelector('body').classList.add('expanded-log');
  
          if (isWin || isWP8) {
              var h = document.querySelector('body').offsetHeight;
  
              document.getElementById('middle').style.height = (h * 0.6 - LOG_HEADER_HEIGHT - CONTENT_TOP_OFFSET) + 'px';
              document.getElementById('middle').style.marginBottom = (h * 0.4) + 'px';
              document.getElementById('middle').style.paddingBottom = (h * 0.4) + 'px';
          }
      } else {
          document.querySelector('body').classList.remove('expanded-log');
  
          if (isWin || isWP8) {
              document.getElementById('middle').style.height = '';
              document.getElementById('middle').style.marginBottom = '';
              document.getElementById('middle').style.paddingBottom = '';
          }
      }
  }
docs: ***************************************************************************