User:Alexis Jazz/TakeAHikeMobileDiff.js

//MobileDiff, take a hike! This script is hereby irrevocably released as WTFPL window.MDTAH = {}; var MDTAH = window.MDTAH; var mw = window.mw; if ( window.location.href.match(/\.m\./) ) { MDTAH.patchLink = function(element) { if ( mw.config.get('wgCanonicalSpecialPageName') == 'History' ) { element.href = element.href.replace(/\.m\./,'.').replace(/\/[^\/]+\/([0-9]*)$/,mw.config.get('wgScript') + '?diff=$1&useskin=minerva'); } else { element.href = element.href.replace(/\.m\./,'.').replace(/php\?.*diff=([0-9]*).*/,'php?diff=$1&useskin=minerva'); }	};	if ( mw.config.get('wgCanonicalSpecialPageName') == 'Recentchanges' ) { mw.util.addCSS('.unFuckedUserLink{display:table;}'); $('.mw-userlink').addClass('unFuckedUserLink').removeClass('mw-userlink'); for (MDTAH.int=0;MDTAH.int<$('.mw-changeslist-diff').length;MDTAH.int++) { MDTAH.patchLink($('.mw-changeslist-diff')[MDTAH.int]); }		$('.mw-changeslist-line-inner').on('click',function{if ( ! document.activeElement || document.activeElement.nodeName != 'A' ) { window.location = $('.mw-changeslist-line-inner:hover .mw-changeslist-diff')[0].href;}}); }	if ( mw.config.get('wgCanonicalSpecialPageName') == 'History' ) { for (MDTAH.int=0;MDTAH.int<$('.page-summary .title').length;MDTAH.int++) { MDTAH.patchLink($('.page-summary .title')[MDTAH.int]); }	} } //