In confirm-paste, do not unnecessarily copy the whole data for preview and 'special_encode' the preview string as required by $overlay->set.
Disable overlay's border in confirm-paste.
Change confirm-paste to preview the pasted data in the overlay.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.