<commit_before># Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

$ ->
  $window = $(window)
  console.log("Screen Resolution: #{screen.width} x #{screen.height}")
  console.log("Window Size: #{$window.width()} x #{$window.height()}")
  console.log("HTML 5 Support? #{Modernizr.canvas}")
  console.log("CSS 3 Support? #{Modernizr.borderradius}")
  plugins = ( "#{plugin.name} #{plugin.description}" for plugin in navigator.plugins)
  window.plugins = plugins
  flash_version = flash for flash in plugins when flash.match /Shockwave/
  # console.log(flash_version)
  # console.log("Flash Version: #{flash_version}")
  user_id = $('#user_id').text()
  user_ip_address = $('#user_ip_address').text()
  # console.log(user_id)
  audio = Modernizr.audio
  video = Modernizr.video
  audio_formats = "ogg: #{audio.ogg}, wav: #{audio.wav}, m4a: #{audio.m4a}"
  video_formats = "ogg: #{video.ogg}, h264: #{video.h264}, webm: #{video.webm}"
  cookies = navigator.cookieEnabled

  update_info = ->
    $.ajax '/update',
      method: 'POST'
      data:
        user_info:
          id: user_id
          screen_resolution: "#{screen.width} x #{screen.height}"
          window_size: "#{$window.width()} x #{$window.height()}"
          html5_support: "#{Modernizr.canvas}"<commit_msg>move user_id out of nested user_info in JSON<commit_after># Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

$ ->
  $window = $(window)
  console.log("Screen Resolution: #{screen.width} x #{screen.height}")
  console.log("Window Size: #{$window.width()} x #{$window.height()}")
  console.log("HTML 5 Support? #{Modernizr.canvas}")
  console.log("CSS 3 Support? #{Modernizr.borderradius}")
  plugins = ( "#{plugin.name} #{plugin.description}" for plugin in navigator.plugins)
  window.plugins = plugins
  flash_version = flash for flash in plugins when flash.match /Shockwave/
  # console.log(flash_version)
  # console.log("Flash Version: #{flash_version}")
  user_id = $('#user_id').text()
  user_ip_address = $('#user_ip_address').text()
  # console.log(user_id)
  audio = Modernizr.audio
  video = Modernizr.video
  audio_formats = "ogg: #{audio.ogg}, wav: #{audio.wav}, m4a: #{audio.m4a}"
  video_formats = "ogg: #{video.ogg}, h264: #{video.h264}, webm: #{video.webm}"
  cookies = navigator.cookieEnabled

  update_info = ->
    $.ajax '/update',
      method: 'POST'
      data:
        user_id: user_id
        user_info:
          screen_resolution: "#{screen.width} x #{screen.height}"
          window_size: "#{$window.width()} x #{$window.height()}"
          html5_support: "#{Modernizr.canvas}"
{'fraction_non_alphanumeric': 0.15931034482758621, 'fraction_numerical': 0.007586206896551724, 'mean_word_length': 4.001724137931035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3296752', 'n_tokens_mistral': 946, 'n_tokens_neox': 929, 'n_words': 238}