var deviceWidth = document.documentElement.clientWidth; if (deviceWidth > 2048) deviceWidth = 2048; document.documentElement.style.fontSize = deviceWidth / 19.2 + 'px'; document.querySelector('#root').className = ''; var navAgent = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i), isMobileSystem = navAgent ? true : false; if (!isMobileSystem) { var style = document.createElement('style'), styleSheet = style.sheet; style.type = 'text/css'; style.appendChild(document.createTextNode('.topLine,.botLine,.botLine,.botLineDot,.leftLine{background-size:auto auto !important;}#root{max-width:100% !important;min-width:19.2rem;}')) document.getElementsByTagName('head')[0].appendChild(style); document.documentElement.style.fontSize = 1160 / 19.2 + 'px'; } function consoleLog(text) { var dom = document.getElementById('consoleLogDom'); if (!dom) { dom = document.createElement("div"); dom.id = 'consoleLogDom'; dom.style.cssText = 'position:fixed;top:0;right:0;z-index:5555;border:#ddd 1px solid;background:#fff;padding:.2rem;'; document.body.appendChild(dom); var empty = document.createElement("div"); empty.style.cssText = 'position:fixed;font-size:.4rem;top:.1rem;right:.1rem;z-index:6666;border:#ddd 1px solid;background:#fff;text-align:center;width:.6rem;height:.6rem;line-height:.6rem;border-radius:.3rem;'; var t = document.createTextNode("X"); empty.appendChild(t); empty.onclick = function () { dom.innerHTML = ''; } document.body.appendChild(empty); } dom.innerHTML = dom.innerHTML + '
' + text + '
'; }