<commit_before>(function ()
{
  var self = {};
  var idRefMap = {};

  var rootRef = new Firebase('https://lutotest.firebaseIO.com/');

  shownoteseditor.connectors.firebase = function (options, cb)
  {
    console.log("firebase init", options);

    this.docRef = new Firebase(options.docid);
    this.notesRef = this.docRef.child('content/notes');
    this.notesRef.on('child_added', fireChildAdded, this);
    this.notesRef.on('child_removed', fireChildRemoved, this);

    idRefMap["_root"] = this.docRef.child('content'); // idRefMap points to a *note*, or to things that have a .child('notes')

    doLogin (options,
      function (err, uid, userRef)
      {<commit_msg>workaround for notes not loading on the 2nd doc open<commit_after>(function ()
{
  var self = {};
  var idRefMap = {};

  var rootRef = new Firebase('https://lutotest.firebaseIO.com/');

  shownoteseditor.connectors.firebase = function (options, cb)
  {
    console.log("firebase init", options);

    this.docRef = new Firebase(options.docid);
    this.notesRef = this.docRef.child('content/notes');
    setTimeout(
      function ()
      {
        this.notesRef.on('child_added', fireChildAdded, this);
        this.notesRef.on('child_removed', fireChildRemoved, this);
      }.bind(this),
      250
    );

    idRefMap["_root"] = this.docRef.child('content'); // idRefMap points to a *note*, or to things that have a .child('notes')

    doLogin (options,
      function (err, uid, userRef)
      {
{'fraction_non_alphanumeric': 0.14797297297297296, 'fraction_numerical': 0.002702702702702703, 'mean_word_length': 3.434131736526946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1665679', 'n_tokens_mistral': 484, 'n_tokens_neox': 470, 'n_words': 107}