<commit_before>BaseController = require 'zooniverse/controllers/base-controller'
Profile = require 'zooniverse/controllers/profile'
User = require 'zooniverse/models/user'
Vue = require 'vue'

$ = window.jQuery

class ProfilePage extends BaseController
  className: 'profile page'
  template: require '../views/profile'

  elements:
    '#zooniverse-profile': 'zooniverseProfile'

  constructor: ->
    super

    profileVue = new Vue
      el: @el.get(0)
      data:
        user: {}

    @profile = new Profile
    @zooniverseProfile.append @profile.el

    User.on 'change', (e, user) ->
      # dislike
      if user
        profileVue.$set 'user', $.extend {}, user
      else
        profileVue.$set 'user', false<commit_msg>Fix Talk link<commit_after>BaseController = require 'zooniverse/controllers/base-controller'
Profile = require 'zooniverse/controllers/profile'
User = require 'zooniverse/models/user'
Subject = require 'zooniverse/models/subject'
Vue = require 'vue'

$ = window.jQuery

talkHref = ->
  "http://microplantstalk.zooniverse.org/#/subjects/#{@zooniverse_id}"

Subject::talkHref = talkHref.bind Subject

class ProfilePage extends BaseController
  className: 'profile page'
  template: require '../views/profile'

  elements:
    '#zooniverse-profile': 'zooniverseProfile'

  constructor: ->
    super

    profileVue = new Vue
      el: @el.get(0)
      data:
        user: {}

    @profile = new Profile
    @zooniverseProfile.append @profile.el

    User.on 'change', (e, user) ->
      # dislike
      if user
        profileVue.$set 'user', $.extend {}, user
      else
        profileVue.$set 'user', false
{'fraction_non_alphanumeric': 0.12278558338423946, 'fraction_numerical': 0.0012217470983506415, 'mean_word_length': 3.1573604060913705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '1184171', 'n_tokens_mistral': 514, 'n_tokens_neox': 501, 'n_words': 119}