User:Peter Karlsen/rollback.js

function batchRollback { hrefs = document.links; var aa; for(aa in hrefs) {   hr = hrefs[aa].href; if(hr.indexOf("&action=roll") >= 0) {     window.open(hr); } } } addOnloadHook(function {  hrefs = document.links;  var aa;  for(aa in hrefs)  {    hr = hrefs[aa].href;    if(hr.indexOf("&action=roll") >= 0)    {      addPortletLink("p-cactions", "javascript:batchRollback", "batch rollback", "ca-batchrollback", "batch rollback");      break;    }  } });