<commit_before>import { h, render } from 'preact';
import User from './user';
import Pages from './components/pages';
import { isNativeIOS } from './utility';
import DebugBox from './components/debug-box';

/**
 * Main app controller, rensponsible for routing between page
 * controllers.
 */
export default class App {

  box: DebugBox;
  user: User;

  /**
   * App will handle routing to page controllers.
   */
  constructor() {
    if (isNativeIOS()) {
      this.bootstrapIOS();
    }

    this.user = new User();
    document.body.classList.add('loaded');

    // Force binding of handleNavigation to this instance.
    this.handleNavigation = this.handleNavigation.bind(this);
  }

  /**
   * Perform any native iOS specific operations.
   */
  private bootstrapIOS() {
    document.body.classList.add('ios');
    this.renderDebugBox();
  }

  /**
   * Get the page name from the url.
   */
  private getPageName(href?: string): string {
    if (!href) {
      href = window.location.href;
    }
    let link = document.createElement('a');
    link.href = href;
    return link.pathname;
  }
<commit_msg>turn off the debug ui on ios<commit_after>import { h, render } from 'preact';
import User from './user';
import Pages from './components/pages';
import { isNativeIOS } from './utility';
import DebugBox from './components/debug-box';

/**
 * Main app controller, rensponsible for routing between page
 * controllers.
 */
export default class App {

  box: DebugBox;
  user: User;

  /**
   * App will handle routing to page controllers.
   */
  constructor() {
    // Disable the debug box for now.
    // if (isNativeIOS()) {
    //   this.bootstrapIOS();
    // }

    this.user = new User();
    document.body.classList.add('loaded');

    // Force binding of handleNavigation to this instance.
    this.handleNavigation = this.handleNavigation.bind(this);
  }

  /**
   * Perform any native iOS specific operations.
   */
  private bootstrapIOS() {
    document.body.classList.add('ios');
    this.renderDebugBox();
  }

  /**
   * Get the page name from the url.
   */
  private getPageName(href?: string): string {
    if (!href) {
      href = window.location.href;
    }
    let link = document.createElement('a');
    link.href = href;
    return link.pathname;
  }

{'fraction_non_alphanumeric': 0.13517060367454067, 'fraction_numerical': 0.0, 'mean_word_length': 2.8116666666666665, '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': '7445143', 'n_tokens_mistral': 699, 'n_tokens_neox': 676, 'n_words': 200}