User:Bearborg/global.js

$(".mw-rollback-link > a").each(function (i, elem) {   elem.onclick = function (event) {        if (!confirm('Revert edit?')) {            event.preventDefault;            return false;        }    }; });

console.log($(".mw-rollback-link > a")[0].onclick);