<commit_before>function emailFormHandler() {
  var sendEmailBtn = document.getElementById('squatch-send-email');
  var emailInput = document.getElementById('squatch-user-email');

  handleClicks(sendEmailBtn, function() {
    if (!isValidEmail(emailInput.value)) {
      my_addClass(emailInput, 'invalid');
      emailInput.onkeypress = function() {
        if (isValidEmail(this.value)) {
          my_removeClass(this, 'invalid');
          my_addClass(this, 'valid');
        }
      }
    } else {
      my_removeClass(emailInput, 'invalid');

      if (window.frameElement && window.frameElement.squatchJsApi) {
        var widget = window.frameElement.squatchJsApi;

        if (window.parent.squatch && window.parent.squatch.widgets().eventBus) {
          window.parent.squatch.widgets().eventBus.dispatch('submit_email', this, widget, emailInput.value);
        } else {
          window.frameElement.squatchJsApi.reload(emailInput.value);
        }
      }
    }
  });
}

function messengerHandler() {
  var messengerBtn = document.getElementsByClassName('messengerShare')[0];

  if (!messengerBtn) return;

  var messengerUrl = 'https://www.facebook.com/dialog/send?app_id=' + squatch.user.facebook.appId + '&link=' + squatch.user.facebook.link + '&redirect_uri=' + squatch.user.facebook.redirectUrl;
  messengerBtn.href = messengerUrl;

  handleClicks(messengerBtn, function(e) {
    // If it's not mobile, don't use href link
    if (e.type != 'touchstart') {
      e.preventDefault();

      var url = messengerUrl + "&display=popup";
      window.open(url, 'fb-messenger', 'status=0,width=620,height=400');
    }

    if (window.frameElement && window.frameElement.squatchJsApi) {
      window.frameElement.squatchJsApi._shareEvent(window.squatch, 'MESSENGER');
    }
  });
}

function smsHandler() {
  var smsBtn = document.getElementsByClassName('smsShare')[0];

  if (!smsBtn) return;

  // Test url
  var smsUrl = 'sms:?body=Jorge%20Conde%20Gomez%20Llanos%20invited%20you%20to%20join%20Airbnb.%20Sign%20up%20and%20get%20%2450%20CAD%20off%20your%20first%20adventure.%20https%3A%2F%2Fwww.airbnb.ca%2Fc%2Fjorgec263%3Fs%3D46';
  smsBtn.href = smsUrl;
}
<commit_msg>JC - try another sms url<commit_after>function emailFormHandler() {
  var sendEmailBtn = document.getElementById('squatch-send-email');
  var emailInput = document.getElementById('squatch-user-email');

  handleClicks(sendEmailBtn, function() {
    if (!isValidEmail(emailInput.value)) {
      my_addClass(emailInput, 'invalid');
      emailInput.onkeypress = function() {
        if (isValidEmail(this.value)) {
          my_removeClass(this, 'invalid');
          my_addClass(this, 'valid');
        }
      }
    } else {
      my_removeClass(emailInput, 'invalid');

      if (window.frameElement && window.frameElement.squatchJsApi) {
        var widget = window.frameElement.squatchJsApi;

        if (window.parent.squatch && window.parent.squatch.widgets().eventBus) {
          window.parent.squatch.widgets().eventBus.dispatch('submit_email', this, widget, emailInput.value);
        } else {
          window.frameElement.squatchJsApi.reload(emailInput.value);
        }
      }
    }
  });
}

function messengerHandler() {
  var messengerBtn = document.getElementsByClassName('messengerShare')[0];

  if (!messengerBtn) return;

  var messengerUrl = 'https://www.facebook.com/dialog/send?app_id=' + squatch.user.facebook.appId + '&link=' + squatch.user.facebook.link + '&redirect_uri=' + squatch.user.facebook.redirectUrl;
  messengerBtn.href = messengerUrl;

  handleClicks(messengerBtn, function(e) {
    // If it's not mobile, don't use href link
    if (e.type != 'touchstart') {
      e.preventDefault();

      var url = messengerUrl + "&display=popup";
      window.open(url, 'fb-messenger', 'status=0,width=620,height=400');
    }

    if (window.frameElement && window.frameElement.squatchJsApi) {
      window.frameElement.squatchJsApi._shareEvent(window.squatch, 'MESSENGER');
    }
  });
}

function smsHandler() {
  var smsBtn = document.getElementsByClassName('smsShare')[0];

  if (!smsBtn) return;

  // Test url
  var smsUrl = 'sms:?body=Testbody';
  smsBtn.href = smsUrl;
}

{'fraction_non_alphanumeric': 0.14340344168260039, 'fraction_numerical': 0.017208413001912046, 'mean_word_length': 3.739524348810872, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 3, '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': '5079840', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1353, 'n_words': 202}