/* If you want to use this script, simply add the following line to your [[Special:Mypage/monobook.js]]:
importScript('User:Anomie/diffcur.js'); // Linkback: [[User:Anomie/diffcur.js]]
* (Please keep the comment so I can see how many people use this).
*/
$( function () {
var nl=$('#differences-nextlink');
if ( !nl || !nl.length ) return;
mw.loader.using( 'mediawiki.Uri', function () {
var h = new URL( nl[0].href );
if ( h.searchParams.get( 'diff' ) === 'next' ) {
h.searchParams.set( 'oldid', new URL( $( '#mw-diff-otitle1 a' )[0].href ).searchParams.get( 'oldid' ) );
}
h.searchParams.set( 'diff', 'cur' );
$( '<a>Cur →</a>' ).attr( 'href', h.toString() ).insertAfter( nl );
nl.after( ' ' );
} );
} );