<commit_before>SoapStone.Controller = function() {
  if ($("[data-view='map']").exists()) {
    this.dropView = new SoapStone.DropView();
    this.dropView.controller = this;

    this.mapView = new SoapStone.MapView();
    this.mapView.controller = this;
    this.mapView.watchCurrentPosition();
    this.map = new SoapStone.Map();
    this.initDrops();
  }

  if ($("[data-view='user']").exists()) {
    this.user = new SoapStone.User();
    this.userView = new SoapStone.UserView();
    Promise.all([this.loadFollows(), this.loadDrops()]).then(function() {
      //viewstuff
    });
  }
  this.mapView.watchCurrentPosition();
  this.map = new SoapStone.Map();
  var userId = this.getUserId();
  this.initDrops(userId);
};

SoapStone.Controller.prototype.getQueryParams = function(){
  var match = /user_id=(\d*)/.exec( location.href);
  if (match){
    return match[1]-0;//the -0 is to turn it into a number
  }
  else{
    return false;
  }
};

SoapStone.Controller.prototype.createDrop = function(form) {
  var self = this;
  var dropData = {
    lat: this.mapView.trackingLocation.lat(),
    lon: this.mapView.trackingLocation.lng()
  };
  var drop = new SoapStone.Drop(dropData);
  var formData = new FormData($(form)[0]);
  this.dropView.showUploadIndicator();<commit_msg>fix the control flow with refresh as well as load<commit_after>SoapStone.Controller = function() {
  if ($("[data-view='map']").exists()) {
    this.dropView = new SoapStone.DropView();
    this.dropView.controller = this;
    this.mapView = new SoapStone.MapView();
    this.mapView.controller = this;
    this.mapView.watchCurrentPosition();
    this.map = new SoapStone.Map();
    var userId = this.getUserId();
    this.initDrops(userId);
  }
  if ($("[data-view='user']").exists()) {
    this.user = new SoapStone.User();
    this.userView = new SoapStone.UserView();
    Promise.all([this.loadFollows(), this.loadDrops()]).then(function() {
      //viewstuff
    });
  }
};

SoapStone.Controller.prototype.getUserId = function(){
  var match = /user_id=(\d*)/.exec( location.href);
  if (match){
    return match[1]-0;//the -0 is to turn it into a number
  }
  else{
    return false;
  }
};

SoapStone.Controller.prototype.createDrop = function(form) {
  var self = this;
  var dropData = {
    lat: this.mapView.trackingLocation.lat(),
    lon: this.mapView.trackingLocation.lng()
  };
  var drop = new SoapStone.Drop(dropData);
  var formData = new FormData($(form)[0]);
  this.dropView.showUploadIndicator();
{'fraction_non_alphanumeric': 0.16693354683746997, 'fraction_numerical': 0.0032025620496397116, 'mean_word_length': 3.6022099447513813, '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': '6628754', 'n_tokens_mistral': 865, 'n_tokens_neox': 843, 'n_words': 161}