jvWebView property

String jvWebView
final

Implementation

final String jvWebView = '''
  var figure = document.body.getElementsByTagName("figure");
  var i = 0;
  while (i < figure.length) {
    var img = figure[i].firstChild;
    img.style.maxWidth = "100%";
    img.style.width = "100%";
    var parent = figure[i].parentNode;
    parent.replaceChild(img, figure[i]);
    i++;
  }
  var img = document.body.getElementsByTagName("img");
  i = 0;
  while (i < img.length) {
    img[i].style.maxWidth = "100%";
    img[i].style.width = "100%";
    i++;
  }
  var iframe = document.body.getElementsByTagName("iframe");
  i = 0;
  while (i < iframe.length) {
    iframe[i].style.maxWidth = "100%";
    iframe[i].style.width = "100%";
    i++;
  }
  var video = document.body.getElementsByTagName("video");
  i = 0;
  while (i < video.length) {
    video[i].style.maxWidth = "100%";
    video[i].style.maxHeight = "100%";
    video[i].style.width = "device-width";
    video[i].style.height = "auto";
    i++;
  }
  var table = document.body.getElementsByTagName("table");
  i = 0;
  while (i < table.length) {
    table[i].style.borderCollapse = "collapse";
    table[i].style.display = "block";
    table[i].style.overflowX = "scroll";
    table[i].style.whiteSpace = "nowrap";
    i++;
  }
  var td = document.body.getElementsByTagName("td");
  i = 0;
  while (i < td.length) {
    td[i].style.border = "1px solid #ddd";
    i++;
  }
''';