<commit_before>// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * @fileoverview Demo login UI.
 */

/**
 * Handles a user clicking anywhere on the screen. This will log the demo user
 * in. Yes, this actually _is the intention.
 */
onClick = function() {
  chrome.send('launchDemoUser');
};

/**
 * Initializes the click handler.
 */
initialize = function() {
  document.addEventListener('click', onClick);
};

disableTextSelectAndDrag();
document.addEventListener('DOMContentLoaded', initialize);
<commit_msg>Fix possible issue with multiple clicks on demo login screen. Though this doesn't currently repro, there is a possibility that if the demo login flow takes too long, a user clicking really fast on the login screen may see unexpected behavior due to multiple login attempts being kicked off. This CL will ensure that that doesn't happen.<commit_after>// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * @fileoverview Demo login UI.
 */

/**
 * Handles a user clicking anywhere on the screen. This will log the demo user
 * in. Yes, this actually _is the intention.
 */
onClick = function(e) {
  document.removeEventListener('click', onClick);
  e.stopPropagation();
  chrome.send('launchDemoUser');
};

/**
 * Initializes the click handler.
 */
initialize = function() {
  document.addEventListener('click', onClick);
};

disableTextSelectAndDrag();
document.addEventListener('DOMContentLoaded', initialize);

{'fraction_non_alphanumeric': 0.10185739964050329, 'fraction_numerical': 0.004793289394847214, 'mean_word_length': 4.235109717868339, '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': '4937310', 'n_tokens_mistral': 446, 'n_tokens_neox': 424, 'n_words': 195}