Sha256: 4471d97dbff5ca5f1e2c1864c764ed85739188f4cb74373cb0568c15a7f0ffda

Contents?: true

Size: 706 Bytes

Versions: 14

Compression:

Stored size: 706 Bytes

Contents

var httpRequest;
var params = "v=<%= Vanity.context.vanity_active_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

14 entries across 14 versions & 1 rubygems

Version Path
vanity-4.0.4 lib/vanity/templates/_vanity.js.erb
vanity-4.0.3 lib/vanity/templates/_vanity.js.erb
vanity-4.0.2 lib/vanity/templates/_vanity.js.erb
vanity-4.0.1 lib/vanity/templates/_vanity.js.erb
vanity-4.0.0 lib/vanity/templates/_vanity.js.erb
vanity-3.1.0 lib/vanity/templates/_vanity.js.erb
vanity-3.0.2 lib/vanity/templates/_vanity.js.erb
vanity-3.0.1 lib/vanity/templates/_vanity.js.erb
vanity-3.0.0 lib/vanity/templates/_vanity.js.erb
vanity-2.2.10 lib/vanity/templates/_vanity.js.erb
vanity-2.2.9 lib/vanity/templates/_vanity.js.erb
vanity-2.2.8 lib/vanity/templates/_vanity.js.erb
vanity-2.2.7 lib/vanity/templates/_vanity.js.erb
vanity-2.2.6 lib/vanity/templates/_vanity.js.erb