User:PhiH/common.js

mw.loader.using( 'mediawiki.util', function {

$( document ).ready( function { 	var diffadded = document.getElementsByClassName("diff-addedline");	for (var i = 0; i < diffadded.length; i++) {		if(diffadded[i].parentElement.children.length == 3){			if(diffadded[i].previousElementSibling.getAttribute("data-marker") == "+"){				if(diffadded[i].children.length == 0) continue;				var inner = diffadded[i].children[0].innerHTML;				diffadded[i].children[0].innerHTML = "" + inner + " ";			}		}	}	var diffdeleted = document.getElementsByClassName("diff-deletedline");	for (var i = 0; i < diffdeleted.length; i++) {		if(diffdeleted[i].parentElement.children.length == 3){			if(diffdeleted[i].previousElementSibling.getAttribute("data-marker") == "−"){				if(diffdeleted[i].children.length == 0) continue;				var inner = diffdeleted[i].children[0].innerHTML;				diffdeleted[i].children[0].innerHTML = "" + inner + " "; }		}	} } ); } );