User:Barto/common.js

/** * Deletes paragraphs created by double blank lines. * Whitespace is fixed using css instead, see $\href{common.css}{\text{user:barto/common.css}}$ * Only on Main, ProofWiki, Help, Axiom, Definition namespaces. * -- */ $(".ns-0 p + h2, .ns-4 p + h2, .ns-12 p + h2, .ns-100 p + h2, .ns-102 p + h2," + ".ns-0 p + h3, .ns-4 p + h3, .ns-12 p + h3, .ns-100 p + h3, .ns-102 p + h3," +  ".ns-0 p + h4, .ns-4 p + h4, .ns-12 p + h4, .ns-100 p + h4, .ns-102 p + h4").prev.filter(function {	s = $(this).html;	return s.substring(0, s.length - 1) == " "; }).remove;//css({"line-height": 0, "margin" : 0});

/** * Small margin for transcluded definitions (h3) on an equivalence of definitions page. * Done with css instead, so content moves less on page load. */ /** if (location.pathname.split('/').slice(-1)[0].startsWith("Equivalence_of_Definitions")) { $(".mw-body h3:not(:first-of-type)").filter(function {return $(this).index <= $(".mw-body h2:nth-of-type(2)").eq(0).index}).css("margin-top", "0.3em"); }*/

/** * Lists with LaTeX numbering * -- */ $('.latexlist').parent.next.children.css('content', '":$(" + counter(item) + "): \quad$"')