ubstr(0,5)=='<xmp>') {
     document.getElementById('right-panel').innerHTML = html.substr(5, html.length-11)
  } else {
     document.getElementById('right-panel').innerHTML = '<xmp>' + html.replace(/xmp\>/g,'xmp&gt;') + '</xmp>' 
  }
}

//=== apply dark mode style
function darkmode() {
  var css = document.getElementById('theme').textContent
  var dark = ' body, pre, code { background:#333!important; color:#ccc!important } '
  dark += '\n #header, a  {background:#555;} th, tr:nth-child(even) {color:#333} 