Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save baptiste-roullin/b936414be1b827af3a82e84b06d593e0 to your computer and use it in GitHub Desktop.
Save baptiste-roullin/b936414be1b827af3a82e84b06d593e0 to your computer and use it in GitHub Desktop.
Extract task results from Optimal workshop
// Extract duration, success rate and directness from the task results tab of a study and copy it to the clipboard
// Launch the script three times, with n in `div:nth-child(n)`replaced by 1, 2, 3.
{
let selector = document.querySelectorAll(".results-task-body .task-charts > div:nth-child(n) .box-plot-label");
let a = []
Array.from(selector).forEach(function(el){a.push(el.textContent.replace(/[ |\n\n|sec]/g,""))});
let output = a.join('\n');
console.log(output);
copy(output)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment