(function (doc, win) { var docEl = doc.documentElement, resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', recalc = function () { var clientWidth = docEl.clientWidth; if (!clientWidth) return; if(clientWidth>740){clientWidth = 740} docEl.style.fontSize = 20 * (clientWidth / 320) + 'px'; }; if (!doc.addEventListener) return; win.addEventListener(resizeEvt, recalc, false); doc.addEventListener('DOMContentLoaded', recalc, false); })(document, window);
(function(){ var viewPortScale=0.5; var detectBrowser = function (name) { if (navigator.userAgent.toLowerCase().indexOf(name) > -1) {return true;} else {return false;}}; var width = parseInt(window.screen.width); var scale = Math.ceil((width * 100) / 720) / 100; var userScalable = 'no'; if (detectBrowser("qq/")) userScalable = 'yes'; document.getElementById('viewport').setAttribute( 'content', 'width=720,user-scalable=' + userScalable + ',initial-scale=' + scale);})();