User:Nageh/rollbackSum.js

/* Credits to User:Ilmari Karonen for original code *       ... User:Porchcrop for minor improvements (documentation at User:Porchcrop/Rollback Summary) *       ... User:Alex_Smotrov for essentially this version (see Village_pump_(technical)/Archive_96) */ $(function{  var promptSummary = function  {        var summary = prompt("Enter summary for rollback (or leave as current to use default summary):", "Reverted edits by $2 (talk) to last version by $1");        if (summary == null || summary == "") return false;        if (summary == "Reverted edits by $2 (talk) to last version by $1") return true;        this.href = this.href.replace("?", "?summary=" + encodeURIComponent(summary) + "&");     };   $('.mw-rollback-link a').click( promptSummary ); })