MediaWiki:Mobile.js

/* Any JavaScript here will be loaded for users using the mobile site */ /* MF broke the mobile styles loading in 1.31 */ mw.loader.load( 'mobile.site.styles' );

/* Add "current revision" and "undo" links to Special:MobileDiff */ $(function {   var urlRegex = /.*Special:MobileDiff\/([0-9]+).*/;    var currentID = location.href.replace(urlRegex, '$1');    var prevID = $('#mw-mf-diffarea .revision-history-prev a[href]').attr('href').replace(urlRegex, '$1');

var pagelink = $('#mw-mf-diffarea a[href*="oldid"]'); pagelink.after(' (View current page)');

$('#mw-mf-diffarea').append('Undo'); });