(Created page with "/* 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:Wwepro126...") Tags: mobile edit mobile web edit |
No edit summary Tags: mobile edit mobile web edit |
||
Line 1: | Line 1: | ||
/* If you want to use this script, simply add the following line to your [[Special:Mypage/monobook.js]]: | /* If you want to use this script, simply add the following line to your [[Special:Mypage/monobook.js]]: | ||
importScript('User: | importScript('User:Wwepro126/diffcur.js'); // Linkback: [[User:Wwepro126/diffcur.js]] | ||
* (Please keep the comment so I can see how many people use this). | * (Please keep the comment so I can see how many people use this). |
Latest revision as of 17:21, 2 May 2019
/* If you want to use this script, simply add the following line to your [[Special:Mypage/monobook.js]]: importScript('User:Wwepro126/diffcur.js'); // Linkback: [[User:Wwepro126/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 mw.Uri( nl[0].href ); if ( h.query.diff === 'next' ) { h.query.oldid = new mw.Uri( $( '#mw-diff-otitle1 a' )[0].href ).query.oldid; } h.query.diff = 'cur'; $( '<a>Cur →</a>' ).attr( 'href', h.toString() ).insertAfter( nl ); nl.after( ' ' ); } ); } );