Sha256: 863e22314cf4de73711ec6f917c99911e338b0f9e5d167fd791faa7832ee33fa
Contents?: true
Size: 825 Bytes
Versions: 10
Compression:
Stored size: 825 Bytes
Contents
<% unless @_vanity_experiments.empty? %> var httpRequest; <% @_vanity_experiments.each do |name, alternative| %> var params = "e=<%= name %>&a=<%= alternative.id %>&authenticity_token=" + encodeURIComponent("<%= 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 %> <% end %>
Version data entries
10 entries across 10 versions & 4 rubygems