调试

一个类似devTool的小工具

  1. if (window.location.href.indexOf('mdev=') > -1) {
  2. var script = document.createElement('script')
  3. script.setAttribute('type', 'text/javascript')
  4. script.setAttribute('src', '//cdn.jsdelivr.net/npm/eruda')
  5. var head = document.getElementsByTagName('head')[0]
  6. head.appendChild(script)
  7. script.onload = function () {
  8. eruda.init()
  9. }
  10. }