<commit_before>IONUX = {
  Interactions: {},
  Models:{},
  Collections:{},
  Views: {},
  Router: {},
  init: function(){
    var router = new IONUX.Router();
    IONUX.ROUTER = router; // Is this too close to IONUX.Router?
    IONUX.setup_ajax_error();
    IONUX.SESSION_MODEL = new IONUX.Models.Session();
    IONUX.SESSION_MODEL.fetch().complete(function(resp) {
      Backbone.history.start({pushState:true, hashChange: false});
      new IONUX.Views.Sidebar({model: IONUX.SESSION_MODEL}).render().el;
      new IONUX.Views.Topbar({model: IONUX.SESSION_MODEL}).render().el
      new IONUX.Views.Search().render().el;
      new IONUX.Views.HelpMenu({model: IONUX.SESSION_MODEL}).render().el;

      // nag popup!
      if (!IONUX.SESSION_MODEL.get('is_registered')) router.user_profile();
    });
    router.handle_navigation();
    return router;
  },
  setup_ajax_error: function(){
    $(document).ajaxError(function(evt, resp){
      var error_obj = JSON.parse(resp['responseText'])['data']['GatewayError'];
      var open_modal = $('.modal-ooi').is(':visible') ? true : false;
      if (open_modal) $('#action-modal').modal('hide').remove();
      new IONUX.Views.Error({error_obj:error_obj,open_modal:open_modal}).render().el;
    });
  },
}<commit_msg>Better check for reg nag popup<commit_after>IONUX = {
  Interactions: {},
  Models:{},
  Collections:{},
  Views: {},
  Router: {},
  init: function(){
    var router = new IONUX.Router();
    IONUX.ROUTER = router; // Is this too close to IONUX.Router?
    IONUX.setup_ajax_error();
    IONUX.SESSION_MODEL = new IONUX.Models.Session();
    IONUX.SESSION_MODEL.fetch().complete(function(resp) {
      Backbone.history.start({pushState:true, hashChange: false});
      new IONUX.Views.Sidebar({model: IONUX.SESSION_MODEL}).render().el;
      new IONUX.Views.Topbar({model: IONUX.SESSION_MODEL}).render().el
      new IONUX.Views.Search().render().el;
      new IONUX.Views.HelpMenu({model: IONUX.SESSION_MODEL}).render().el;

      // nag popup!
      if (IONUX.SESSION_MODEL.get('is_logged_in') && !IONUX.SESSION_MODEL.get('is_registered'))
        router.user_profile();
    });
    router.handle_navigation();
    return router;
  },
  setup_ajax_error: function(){
    $(document).ajaxError(function(evt, resp){
      var error_obj = JSON.parse(resp['responseText'])['data']['GatewayError'];
      var open_modal = $('.modal-ooi').is(':visible') ? true : false;
      if (open_modal) $('#action-modal').modal('hide').remove();
      new IONUX.Views.Error({error_obj:error_obj,open_modal:open_modal}).render().el;
    });
  },
}
{'fraction_non_alphanumeric': 0.17964533538936006, 'fraction_numerical': 0.0, 'mean_word_length': 3.841417910447761, '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': '1028041', 'n_tokens_mistral': 887, 'n_tokens_neox': 868, 'n_words': 134}