close

  
<p> var theTaskQueue;

function onLoad() {
  theTaskQueue = new TaskQueue(
    "/task" + document.location.search,
    "/vote",
    { taskContainer: $("#tasks")[0],
      undoButton: $("#undo")[0],
      keyCodeToVote: {
        //8 : "*undo*",
        //38 : "*undo*",
        //13 : "skip",
        //40 : "skip"
      },
      charCodeToVote: {
        //"y" : "same",
        //"n" : "different",
        //"c" : "cant",
        //"b" : "bad",
        //"p" : "*undo*"
      },
      showCount: 2,
      undoCount: 1,
      onTaskFocus: function() {
        enforce_help_state();
      }
    }
  );
  theTaskQueue.start(
    function() { $("#loading-message").remove(); }
  );
  
  if (isIPhone) {
    $("#tasks")[0].scrollIntoView(true);
  }
}

function vote(button, voteValue, inputMethod) {
  theTaskQueue.submitVote(null, voteValue, inputMethod);
}

function flipHandedness() {
  document.body.className = (document.body.className == "right-handed") ? "left-handed" : "right-handed";
}

 </p>

Comments

Hide