<commit_before>
"use strict";

var addAppBar, setupAppBar, setButtonAction, handleBarEval, handleBarNavigate, handleBarShare;
var WAT, appBarConfig, barActions, settingsConfig;

// Public API
var self = {
  init: function (WATref) {
      if (!WAT) {
          WAT = WATref;
          appBarConfig = (WAT.manifest.wat_appBar || {});
          settingsConfig = (WAT.manifest.wat_settings || {});

          barActions = {
              eval: handleBarEval,
              navigate: handleBarNavigate,
              share: handleBarShare
          };

          if (appBarConfig.enabled || settingsConfig.enabled) {
              addAppBar();
          }
      }
  }
};

// Private methods

addAppBar = function () {

    var div = document.createElement("div");
    div.setAttribute("data-win-control", "WinJS.UI.AppBar");
    div.setAttribute("data-win-options", "{placement: 'bottom'}");
    div.style.zIndex = 11111;

    document.body.appendChild(div);
    WAT.components.appBar = div;

    setupAppBar();
};

setupAppBar = function () {
  var appBarEl = WAT.components.appBar;

  //appBarEl.winControl.sticky = appBarConfig.makeSticky;

  // Determine whether to build the app bar only for the privacy button.
  var privacyOnly = WAT.manifest.wat_settings &&
  WAT.manifest.wat_settings.enabled &&
  WAT.manifest.wat_settings.privacyUrl != "";

  // Determine whether the share button should be shown
  var showShare = WAT.manifest.wat_share &&
  WAT.manifest.wat_share.enabled &&<commit_msg>[windows 10] show the appbar only when the page contents are loaded. In sync with extended splash screen<commit_after>
"use strict";

var addAppBar, setupAppBar, setButtonAction, handleBarEval, handleBarNavigate, handleBarShare;
var WAT, appBarConfig, barActions, settingsConfig;

// Public API
var self = {
  init: function (WATref) {
      if (!WAT) {
          WAT = WATref;
          appBarConfig = (WAT.manifest.wat_appBar || {});
          settingsConfig = (WAT.manifest.wat_settings || {});

          barActions = {
              eval: handleBarEval,
              navigate: handleBarNavigate,
              share: handleBarShare
          };

          if (appBarConfig.enabled || settingsConfig.enabled) {
              addAppBar();
          }
      }
  }
};

// Private methods

addAppBar = function () {

    var div = document.createElement("div");
    div.setAttribute("data-win-control", "WinJS.UI.AppBar");
    div.setAttribute("data-win-options", "{placement: 'bottom'}");
    div.style.zIndex = 11111;

    document.body.appendChild(div);
    WAT.components.appBar = div;

    setupAppBar();

    div.style.visibility = "hidden";

    // show the appBar only when the page contents are loaded, in sync with the extended splash screen
    WAT.components.webView.addEventListener("MSWebViewDOMContentLoaded", function (e) {
       WAT.components.appBar.style.visibility = "visible";
    });
};

setupAppBar = function () {
  var appBarEl = WAT.components.appBar;

  //appBarEl.winControl.sticky = appBarConfig.makeSticky;

  // Determine whether to build the app bar only for the privacy button.
  var privacyOnly = WAT.manifest.wat_settings &&
  WAT.manifest.wat_settings.enabled &&
  WAT.manifest.wat_settings.privacyUrl != "";

  // Determine whether the share button should be shown
  var showShare = WAT.manifest.wat_share &&
  WAT.manifest.wat_share.enabled &&
{'fraction_non_alphanumeric': 0.11752516281823565, 'fraction_numerical': 0.003552397868561279, 'mean_word_length': 2.9199535962877032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1275151', 'n_tokens_mistral': 1057, 'n_tokens_neox': 997, 'n_words': 231}