Sha256: f32d4a8ae8e61f0b8afcad09cc09e0a1e92181ca122a0d632563c688ca986093

Contents?: true

Size: 686 Bytes

Versions: 15

Compression:

Stored size: 686 Bytes

Contents

var httpRequest;
var params = "v=<%= @_vanity_experiments.map{|name, alternative| "#{name}=#{alternative.id}" }.join(',') %>&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);
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vanity-2.2.4 lib/vanity/templates/_vanity.js.erb
vanity-2.2.3 lib/vanity/templates/_vanity.js.erb
vanity-2.2.2 lib/vanity/templates/_vanity.js.erb
vanity-2.2.1 lib/vanity/templates/_vanity.js.erb
vanity-2.2.0 lib/vanity/templates/_vanity.js.erb
vanity-2.1.2 lib/vanity/templates/_vanity.js.erb
vanity-2.1.1 lib/vanity/templates/_vanity.js.erb
vanity-2.1.0 lib/vanity/templates/_vanity.js.erb
vanity-2.0.1 lib/vanity/templates/_vanity.js.erb
vanity-2.0.0 lib/vanity/templates/_vanity.js.erb
vanity-2.0.0.beta9 lib/vanity/templates/_vanity.js.erb
vanity-2.0.0.beta8 lib/vanity/templates/_vanity.js.erb
vanity-2.0.0.beta7 lib/vanity/templates/_vanity.js.erb
vanity-2.0.0.beta6 lib/vanity/templates/_vanity.js.erb
vanity-2.0.0.beta5 lib/vanity/templates/_vanity.js.erb