MediaWiki:Mobile app.js

function scrollAnchor(o){var t=$("#"+o).offset.top-15;window.scrollTo(0,t),console.log(t)}$(document).ready(function{$("table:not(.msgbox):not(.modal-table)").each(function(o,t){var n,a="";n="infobox-rows"==$(t).attr("class")?"Info Box":"Table",$(t).find("tbody td").each(function(o,t){$(t).text.length&&(a=a+$(t).text+", ")}),a=a.substr(0,62)+"...",$(t).before(' View '+n+": "+a+" ")}),$("button.modal-button").click(function{var o=$(" ").addClass("infobox-container"),t=this.nextSibling.cloneNode(!0);if($(t).appendTo(o),this.nextSibling.classList.contains("infobox-rows")){var n=$(" ").addClass("infobox-header-container");$(this).parent.find(".infobox-title").clone.appendTo(n),$(this).parent.find(".infobox-imagearea").clone.appendTo(n);$(n).prependTo(o)}t.classList.add("modal-table"),$(t).attr("style",""),console.log(o.html)});var o=$("body").find("table.modal-table").width;null!=o&&o>$("body").width+64&&$("body").css("width",o+64)});