Sha256: 81e037a07b4e1c776cc7e5907f8ba4059c627f95437f3ccab82a9ba665d00ebd
Contents?: true
Size: 721 Bytes
Versions: 7
Compression:
Stored size: 721 Bytes
Contents
var httpRequest; <% @_vanity_experiments.each do |name, alternative| %> var params = "e=<%= name %>&a=<%= alternative.id %>&authenticity_token=<%= CGI.escape(form_authenticity_token) %>"; if (window.XMLHttpRequest) { // Mozilla, Safari, ... httpRequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { // IE try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { } } if (httpRequest) { httpRequest.open('POST', "<%= Vanity.playground.add_participant_path %>", true); httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httpRequest.setRequestHeader("X-Requested-With", "XMLHttpRequest"); httpRequest.send(params); } <% end %>
Version data entries
7 entries across 7 versions & 1 rubygems