init code refactorization - global var

so we’re moving all of the header script pretty much into branch.js? is this so we dont have to copy over the config file info?
On December 17, 2014 at 5:41:37 PM, Dmitri G (notifications@github.com) wrote:

In example.html:

> +          Branch = this;
> +          Branch.app_id = a.app_id;
> +          Branch.debug = a.debug;
> +          Branch.init_callback = a.init_callback;
> +          Branch.queued = [];
> +          this.init = function() {
> +              for (var a = ["close", "logout", "track", "identify", "createLink", "showReferrals", "showCredits",
> +                  "redeemCredits", "appBanner"], b = 0; b < a.length; b++)
> +                  Branch[a[b]] = function(a) {
> +                      return function() {
> +                          Branch.queued.push([a].concat(Array
> +                          .prototype.slice.call(arguments, 0)))
> +                      }
> +                  }(a[b])
> +          }
> +          var oldBranch = Branch;
Yeah - what I'm saying is move this and the next 5 lines into the top of branch.js. does that make sense?

—
Reply to this email directly or view it on GitHub.