MediaWiki:Mobile app.js

$(document).ready(function { $('table:not(.msgbox)').each(function(i, element) { var tableType; var buttonText = '';

if ($(element).attr('class') == 'infobox-rows') { tableType = 'Info Box'; } else { tableType = 'Table'; }

$(element).find('tbody td').each(function(i, element) {     if ($(element).text.length) {        buttonText = buttonText + $(element).text + ', ';      }    });

buttonText = buttonText.substr(0, 62) + '...';

$(element).before(' View ' +     tableType +      ': ' +      buttonText +      ' '); });

$('button.modal-button').click(function {   console.log(this.nextSibling.outerHTML);  }); });