MediaWiki:Mobile app.js

From Terraria Wiki
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
function scrollAnchor(t){var o=$("#"+t).offset().top-15;window.scrollTo(0,o),console.log(o)}$(document).ready(function(){1!==$("body").find("> .modal-table").length&&$("table").each(function(){if(!$(this).hasClass("msgbox")&&!$(this).hasClass("modal-table")&&$(this).outerWidth()>window.innerWidth-32){var t="";$(this).hide(),$(this).parent().attr("style",""),$(this).data("description")&&(t=$(this).data("description")),$(this).before('<button type="button" class="modal-button"><strong>View Table'+($(this).data("description")?": ":"")+t+"</strong></button>")}}),$("button.modal-button").click(function(){var t=$("<div>"),o=this.nextSibling.cloneNode(!0);$(o).appendTo(t),o.classList.add("modal-table"),$(o).attr("style",""),console.log(t.html())})});