<commit_before>class GelatoView extends Backbone.View {

  constructor(options) {
    super(options);

    this.components = {};
  }

  _handleClickNavigate(event) {
    event.preventDefault();
    const $target = Backbone.$(event.currentTarget);
    const href = $target.attr('href');
    const navigate = $target.attr('navigate');

    if (href === '#') {
      return;
    }

    if (navigate === 'navigate') {
      window.app.router.navigate(navigate, {trigger: true});
    } else {
      document.location.href = href;
    }
  }

  _parseTemplate(template, context) {
    return _.isFunction(template) ? template(this.getContext(context)) : template;
  }

  getContext(context) {
    context = $.extend(
      true,
      window.app.context || {},
      context || {}
    );

    context.view = this;

    return context;
  }

  getHeight() {
    return this.$el.height();
  }

  getWidth() {
    return this.$el.width();
  }

  hide() {
    this.$el.hide();<commit_msg>Remove root url href and navigates routes<commit_after>class GelatoView extends Backbone.View {

  constructor(options) {
    super(options);

    this.components = {};
  }

  _handleClickNavigate(event) {
    event.preventDefault();
    const $target = Backbone.$(event.currentTarget);
    const href = $target.attr('href').replace(Backbone.history.root, '');
    const navigate = $target.attr('navigate').replace(Backbone.history.root, '');

    if (href === '#') {
      return;
    }

    if (navigate === 'navigate') {
      window.app.router.navigate(href, {trigger: true});
    } else {
      document.location.href = href;
    }
  }

  _parseTemplate(template, context) {
    return _.isFunction(template) ? template(this.getContext(context)) : template;
  }

  getContext(context) {
    context = $.extend(
      true,
      window.app.context || {},
      context || {}
    );

    context.view = this;

    return context;
  }

  getHeight() {
    return this.$el.height();
  }

  getWidth() {
    return this.$el.width();
  }

  hide() {
    this.$el.hide();
{'fraction_non_alphanumeric': 0.1603128054740958, 'fraction_numerical': 0.0, 'mean_word_length': 2.7559633027522934, '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': '4470058', 'n_tokens_mistral': 657, 'n_tokens_neox': 636, 'n_words': 113}