function formatDocument() {
  if (document.viewMode) {
    document.body.classList.add(document.viewMode);
  }
  // playstore.css is injected into the document and it is applied first.
  // Need to remove existing links that contain references to external
  // stylesheets which override playstore.css.
  var links = document.head.getElementsByTagName('link');
  for (var i = links.length - 1; i >= 0; --i) {
    document.head.removeChild(links[i]);
  }

  // Create base element that forces internal links to be opened in new window.
  var base = document.createElement('base');
  base.target = '_blank';
  document.head.appendChild(base);

  // Remove header element that contains logo image we don't want to show in
  // our view.
  var doc = document;
  document.body.removeChild(doc.getElementById('play-header'));

  // Hide content at this point. We might want to redirect our view to terms
  // that exactly match current language and country code.
  document.body.hidden = true;
}
/**
 * Formats current document in order to display it correctly.
 */
Formats current document in order to display it correctly.
Formats current document in order to display it correctly .
function formatDocument() {
  if (document.viewMode) {
    document.body.classList.add(document.viewMode);
  }
  var links = document.head.getElementsByTagName('link');
  for (var i = links.length - 1; i >= 0; --i) {
    document.head.removeChild(links[i]);
  }
  var base = document.createElement('base');
  base.target = '_blank';
  document.head.appendChild(base);
  var doc = document;
  document.body.removeChild(doc.getElementById('play-header'));
  document.body.hidden = true;
}
function formatDocument ( ) { if ( document . viewMode ) { document . body . classList . add ( document . viewMode ) ; } var links = document . head . getElementsByTagName ( 'link' ) ; for ( var i = links . length - 1 ; i >= 0 ; -- i ) { document . head . removeChild ( links [ i ] ) ; } var base = document . createElement ( 'base' ) ; base . target = '_blank' ; document . head . appendChild ( base ) ; var doc = document ; document . body . removeChild ( doc . getElementById ( 'play-header' ) ) ; document . body . hidden = true ; }
Formats current document in order to display it correctly.
Formats current document in order to display it correctly .
// playstore.css is injected into the document and it is applied first. // Need to remove existing links that contain references to external // stylesheets which override playstore.css. // Create base element that forces internal links to be opened in new window. // Remove header element that contains logo image we don't want to show in // our view. // Hide content at this point. We might want to redirect our view to terms // that exactly match current language and country code.