User:GoldenRing/generate-diffs.js

$(document).ready(function { // User contribution lists don't already have checkboxes  var versions = $('ul.mw-contributions-list').find('li[data-mw-revid]');  versions.prepend(function(i, el) { return ''; });

$('div.mw-history-revisionactions').prepend('Copy diffs to clipboard '); $('form.mw-contributions-form').after(' Copy diffs to clipboard '); $('button#copydiffs').after(''); $('button#copydiffs').click(function {   var checked_boxes = $($('input[type="checkbox"][name^="ids["]:checked').get.reverse);    var text =      checked_boxes.map(function (index, element) { var name = $(element).attr('name'); var id = name.substring(4, name.length-1); return 'diff'; }).get.join(', ');   var target = document.getElementById('diff-list-copy-field');    target.value = text;    target.focus;    console.log(target.value);    target.setSelectionRange(0, target.value.length);    console.log(document.execCommand('copy'));  }); });