document.observe('xwiki:livetable:newrow', function(event) {
  // Add the xredirect parameter to the query string of the delete action to
  // redirect the user back to the live table after an application is deleted.
  var deleteLink = event.memo.row.down('td.actions').down('a.actiondelete');
  deleteLink.href = deleteLink.href + '&xredirect=' + encodeURIComponent(window.location.href);
});
