User:Bearborg/global.js

let rollbacks = document.getElementsByClassName('mw-rollback-link'); let confirmRollback = function (event) { if (!confirm('Revert edit?')) { event.preventDefault; }   };

for (let i = 0; i < rollbacks.length; i++) { rollbacks[i].onclick = confirmRollback; }