Dallinger/Dallinger

View on GitHub
demos/dlgr/demos/twentyfortyeight/static/scripts/experiment.js

Summary

Maintainability
A
0 mins
Test Coverage
var my_node_id;

// Create the agent.
create_agent = function() {
  dallinger.createAgent()
    .done(function (resp) {
      my_node_id = resp.node.id;
    })
    .fail(function (rejection) {
      // A 403 is our signal that it's time to go to the questionnaire
      if (rejection.status === 403) {
        dallinger.allowExit();
        dallinger.goToPage('questionnaire');
      } else {
        dallinger.error(rejection);
      }
    });
};

$(".restart-button").hide();