<commit_before>var OauthController = Ember.Controller.extend({
  needs: ['user'],
  allowOauth: Em.computed.alias('controllers.user.model'),
  showModal: false,
  authorizeUrl: function(){
    var oauthOptions = this.get('oauthOptions');
    var url = oauthOptions.authorizeUrl;
    url += "?response_type=token";
    url += "&redirect_uri=" + encodeURIComponent(oauthOptions.redirectUri);
    url += "&client_id=" + encodeURIComponent(oauthOptions.clientId);
    return url;
  }.property('oauthOptions'),
  beginFlow: function(oauthOptions) {
    this.deferred = new Ember.RSVP.defer();
    this.set('oauthOptions', oauthOptions);
    this.set('showModal', true);
    return this.deferred.promise;
  },
  approve: function(){
    // spawn the popup
    var oauthOptions = this.get('oauthOptions'),
        windowUrl = this.get('authorizeUrl'),
        width = oauthOptions.width || 960,
        height = oauthOptions.height || 410;
    window.open(windowUrl, "authwindow", "menubar=0,resizable=1,width=" + width + ",height=" + height);
    var self = this;
    function onmessage(e) {
      self.handleOauthCode(e);
      window.removeEventListener("message", onmessage);<commit_msg>jshint fix<commit_after>var OauthController = Ember.Controller.extend({
  needs: ['user'],
  allowOauth: Ember.computed.alias('controllers.user.model'),
  showModal: false,
  authorizeUrl: function(){
    var oauthOptions = this.get('oauthOptions');
    var url = oauthOptions.authorizeUrl;
    url += "?response_type=token";
    url += "&redirect_uri=" + encodeURIComponent(oauthOptions.redirectUri);
    url += "&client_id=" + encodeURIComponent(oauthOptions.clientId);
    return url;
  }.property('oauthOptions'),
  beginFlow: function(oauthOptions) {
    this.deferred = new Ember.RSVP.defer();
    this.set('oauthOptions', oauthOptions);
    this.set('showModal', true);
    return this.deferred.promise;
  },
  approve: function(){
    // spawn the popup
    var oauthOptions = this.get('oauthOptions'),
        windowUrl = this.get('authorizeUrl'),
        width = oauthOptions.width || 960,
        height = oauthOptions.height || 410;
    window.open(windowUrl, "authwindow", "menubar=0,resizable=1,width=" + width + ",height=" + height);
    var self = this;
    function onmessage(e) {
      self.handleOauthCode(e);
      window.removeEventListener("message", onmessage);
{'fraction_non_alphanumeric': 0.14780405405405406, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 4.127705627705628, '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': '4858099', 'n_tokens_mistral': 755, 'n_tokens_neox': 748, 'n_words': 138}