function renderTheme() {
  $(IDS.NTP_CONTENTS).classList.toggle(CLASSES.DARK, getIsThemeDark());

  var info = getThemeBackgroundInfo();
  if (!info)
    return;

  var background = [convertToRGBAColor(info.backgroundColorRgba),
                    info.imageUrl,
                    info.imageTiling,
                    info.imageHorizontalAlignment,
                    info.imageVerticalAlignment].join(' ').trim();

  document.body.style.background = background;
  document.body.classList.toggle(CLASSES.ALTERNATE_LOGO, info.alternateLogo);
  var isNonWhiteBackground = !WHITE_BACKGROUND_COLORS.includes(background);
  document.body.classList.toggle(CLASSES.NON_WHITE_BG, isNonWhiteBackground);
  updateThemeAttribution(info.attributionUrl, info.imageHorizontalAlignment);
  setCustomThemeStyle(info);

  if (info.customBackgroundConfigured) {
    var imageWithOverlay =
        [CUSTOM_BACKGROUND_OVERLAY, info.imageUrl].join(',').trim();
    document.body.style.setProperty('background-image', imageWithOverlay);
  }
  $(customBackgrounds.IDS.RESTORE_DEFAULT).hidden =
      !info.customBackgroundConfigured;

  if (configData.isGooglePage) {
    $('edit-bg').hidden =
        !configData.isCustomBackgroundsEnabled || !info.usingDefaultTheme;
  }
}
/**
 * Updates the NTP based on the current theme.
 * @private
 */
Updates the NTP based on the current theme.
@private
Updates the NTP based on the current theme . @private
function renderTheme() {
  $(IDS.NTP_CONTENTS).classList.toggle(CLASSES.DARK, getIsThemeDark());
  var info = getThemeBackgroundInfo();
  if (!info)
    return;
  var background = [convertToRGBAColor(info.backgroundColorRgba),
                    info.imageUrl,
                    info.imageTiling,
                    info.imageHorizontalAlignment,
                    info.imageVerticalAlignment].join(' ').trim();
  document.body.style.background = background;
  document.body.classList.toggle(CLASSES.ALTERNATE_LOGO, info.alternateLogo);
  var isNonWhiteBackground = !WHITE_BACKGROUND_COLORS.includes(background);
  document.body.classList.toggle(CLASSES.NON_WHITE_BG, isNonWhiteBackground);
  updateThemeAttribution(info.attributionUrl, info.imageHorizontalAlignment);
  setCustomThemeStyle(info);
  if (info.customBackgroundConfigured) {
    var imageWithOverlay =
        [CUSTOM_BACKGROUND_OVERLAY, info.imageUrl].join(',').trim();
    document.body.style.setProperty('background-image', imageWithOverlay);
  }
  $(customBackgrounds.IDS.RESTORE_DEFAULT).hidden =
      !info.customBackgroundConfigured;
  if (configData.isGooglePage) {
    $('edit-bg').hidden =
        !configData.isCustomBackgroundsEnabled || !info.usingDefaultTheme;
  }
}
function renderTheme ( ) { $ ( IDS . NTP_CONTENTS ) . classList . toggle ( CLASSES . DARK , getIsThemeDark ( ) ) ; var info = getThemeBackgroundInfo ( ) ; if ( ! info ) return ; var background = [ convertToRGBAColor ( info . backgroundColorRgba ) , info . imageUrl , info . imageTiling , info . imageHorizontalAlignment , info . imageVerticalAlignment ] . join ( ' ' ) . trim ( ) ; document . body . style . background = background ; document . body . classList . toggle ( CLASSES . ALTERNATE_LOGO , info . alternateLogo ) ; var isNonWhiteBackground = ! WHITE_BACKGROUND_COLORS . includes ( background ) ; document . body . classList . toggle ( CLASSES . NON_WHITE_BG , isNonWhiteBackground ) ; updateThemeAttribution ( info . attributionUrl , info . imageHorizontalAlignment ) ; setCustomThemeStyle ( info ) ; if ( info . customBackgroundConfigured ) { var imageWithOverlay = [ CUSTOM_BACKGROUND_OVERLAY , info . imageUrl ] . join ( ',' ) . trim ( ) ; document . body . style . setProperty ( 'background-image' , imageWithOverlay ) ; } $ ( customBackgrounds . IDS . RESTORE_DEFAULT ) . hidden = ! info . customBackgroundConfigured ; if ( configData . isGooglePage ) { $ ( 'edit-bg' ) . hidden = ! configData . isCustomBackgroundsEnabled || ! info . usingDefaultTheme ; } }
Updates the NTP based on the current theme.
Updates the NTP based on the current theme .