<commit_before> /**
 * SettingsView.js
 */
(function (spiderOakApp, window, undefined) {
  "use strict";
  var console = window.console || {};
  console.log = console.log || function(){};
  var Backbone    = window.Backbone,
      _           = window._,
      $           = window.$,
      s           = window.s;

  spiderOakApp.SettingsView = Backbone.View.extend({
    destructionPolicy: "never",
    events: {
      "tap .send-feedback": "feedback_tapHandler",
      "tap .account-settings": "accountSettings_tapHandler",
      "tap .server": "server_tapHandler",
      "tap .logout": "logout_tapHandler",
      "change #settings-rememberme": "rememberMe_changeHandler"
    },
    initialize: function() {
      window.bindMine(this);
      this.on("viewActivate", this.viewActivate);
      this.on("viewDeactivate", this.viewDeactivate);
      $(document).on("settingChanged", this.render);
      $(document).on("logoutSuccess", this.render);
      spiderOakApp.navigator.on("viewChanging", this.viewChanging);
    },
    render: function() {
      this.settingsInfo = spiderOakApp.storageBarModel &&
                          spiderOakApp.storageBarModel.toJSON() ||
                          {};
      this.settingsInfo.firstname = this.settingsInfo.firstname || "";
      this.settingsInfo.lastname = this.settingsInfo.lastname || "";
      _.extend(this.settingsInfo,
               {server: spiderOakApp.settings.getValue("server")});
      this.$el.html(window.tmpl["settingsViewTemplate"](this.settingsInfo));
      this.scroller = new window.iScroll(this.el, {
        bounce: !$.os.android,
        vScrollbar: !$.os.android,
        hScrollbar: false
      });

      return this;
    },
    noop: function(event) {
      event.stopPropagation();
      event.preventDefault();
      return false;
    },
    feedback_tapHandler: function() {
      // @FIXME: This is a bit Android-centric
      var platform = (($.os.android)?"Android":"iOS");
      var subject = ("Feedback on " + s("SpiderOak") + platform +
                     " app version " + spiderOakApp.version);
      var extras = {};
      extras[spiderOakApp.fileViewer.EXTRA_SUBJECT] = subject;
      extras[spiderOakApp.fileViewer.EXTRA_EMAIL] =
        window.spiderOakApp.settings.getOrDefault("contactEmail",
          platform + "@" + s("<EMAIL>"));
      var params = {
        action: spiderOakApp.fileViewer.ACTION_SEND,
        type: "text/plain",
        extras: extras
      };
      if ($.os.ios) {
        console.log("CLICKITY!");
        window.location.href = "mailto:"+<commit_msg>Gah! Yet another rogue console.log.<commit_after> /**
 * SettingsView.js
 */
(function (spiderOakApp, window, undefined) {
  "use strict";
  var console = window.console || {};
  console.log = console.log || function(){};
  var Backbone    = window.Backbone,
      _           = window._,
      $           = window.$,
      s           = window.s;

  spiderOakApp.SettingsView = Backbone.View.extend({
    destructionPolicy: "never",
    events: {
      "tap .send-feedback": "feedback_tapHandler",
      "tap .account-settings": "accountSettings_tapHandler",
      "tap .server": "server_tapHandler",
      "tap .logout": "logout_tapHandler",
      "change #settings-rememberme": "rememberMe_changeHandler"
    },
    initialize: function() {
      window.bindMine(this);
      this.on("viewActivate", this.viewActivate);
      this.on("viewDeactivate", this.viewDeactivate);
      $(document).on("settingChanged", this.render);
      $(document).on("logoutSuccess", this.render);
      spiderOakApp.navigator.on("viewChanging", this.viewChanging);
    },
    render: function() {
      this.settingsInfo = spiderOakApp.storageBarModel &&
                          spiderOakApp.storageBarModel.toJSON() ||
                          {};
      this.settingsInfo.firstname = this.settingsInfo.firstname || "";
      this.settingsInfo.lastname = this.settingsInfo.lastname || "";
      _.extend(this.settingsInfo,
               {server: spiderOakApp.settings.getValue("server")});
      this.$el.html(window.tmpl["settingsViewTemplate"](this.settingsInfo));
      this.scroller = new window.iScroll(this.el, {
        bounce: !$.os.android,
        vScrollbar: !$.os.android,
        hScrollbar: false
      });

      return this;
    },
    noop: function(event) {
      event.stopPropagation();
      event.preventDefault();
      return false;
    },
    feedback_tapHandler: function() {
      // @FIXME: This is a bit Android-centric
      var platform = (($.os.android)?"Android":"iOS");
      var subject = ("Feedback on " + s("SpiderOak") + platform +
                     " app version " + spiderOakApp.version);
      var extras = {};
      extras[spiderOakApp.fileViewer.EXTRA_SUBJECT] = subject;
      extras[spiderOakApp.fileViewer.EXTRA_EMAIL] =
        window.spiderOakApp.settings.getOrDefault("contactEmail",
          platform + "@" + s("<EMAIL>"));
      var params = {
        action: spiderOakApp.fileViewer.ACTION_SEND,
        type: "text/plain",
        extras: extras
      };
      if ($.os.ios) {
        window.location.href = "mailto:"+
{'fraction_non_alphanumeric': 0.1454686892259821, 'fraction_numerical': 0.0, 'mean_word_length': 2.5444521019986217, 'pattern_counts': {'":': 12, '<': 5, '<?xml version=': 0, '>': 5, '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': '2196277', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1540, 'n_words': 252}