<commit_before>var findTool = (function() {
  var VISIBLE_STYLE = 'block';
  var HIDDEN_STYLE = 'none';
  var containerElement = null, browserInstance = null, controller = null;
  var form = null, findText = null, matchCase = null, findBackward = null,
  findForward = null, findResult = null;
  var findMatchCase = false;
  function query(id) {
    return containerElement.querySelector(id);
  }
  var FindController = function(container, browser) {
    containerElement = container;
    browserInstance = browser;
    form = query('#find-form');
    findText = query('#find-text');
    findResults = query('#find-results');
    findBackward = query("#find-backward");
    findForward = query("#find-forward");
    matchCase = query("#match-case");
    controller = this;
    initHandlers();
  }

  function isVisible() {
    return containerElement.style.display ==  VISIBLE_STYLE;
  }

  function hideBox() {
    containerElement.style.display = HIDDEN_STYLE;
  }

  function showBox() {
    setWebviewFindUpdateHandler();
    containerElement.style.display = VISIBLE_STYLE;
  }

  FindController.prototype.toggleVisibility = function() {
    if (isVisible()) {
      hideBox();
    } else {
      showBox();
    }
  };

  function findTextOnInput(e) {
    browserInstance.tabs.getSelected().webview.find(<commit_msg>Fixed the issue with Ctrl+F not automatically selecting the input text.<commit_after>var findTool = (function() {
  var VISIBLE_STYLE = 'block';
  var HIDDEN_STYLE = 'none';
  var containerElement = null, browserInstance = null, controller = null;
  var form = null, findText = null, matchCase = null, findBackward = null,
  findForward = null, findResult = null;
  var findMatchCase = false;
  function query(id) {
    return containerElement.querySelector(id);
  }
  var FindController = function(container, browser) {
    containerElement = container;
    browserInstance = browser;
    form = query('#find-form');
    findText = query('#find-text');
    findResults = query('#find-results');
    findBackward = query("#find-backward");
    findForward = query("#find-forward");
    matchCase = query("#match-case");
    controller = this;
    initHandlers();
  }

  function isVisible() {
    return containerElement.style.display ==  VISIBLE_STYLE;
  }

  function hideBox() {
    containerElement.style.display = HIDDEN_STYLE;
  }

  function showBox() {
    setWebviewFindUpdateHandler();
    containerElement.style.display = VISIBLE_STYLE;
    findText.select();
  }

  FindController.prototype.toggleVisibility = function() {
    if (isVisible()) {
      hideBox();
    } else {
      showBox();
    }
  };

  function findTextOnInput(e) {
    browserInstance.tabs.getSelected().webview.find(
{'fraction_non_alphanumeric': 0.12495406100698273, 'fraction_numerical': 0.0, 'mean_word_length': 3.7421602787456445, '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': '1693296', 'n_tokens_mistral': 831, 'n_tokens_neox': 798, 'n_words': 176}