|
@@ -20,6 +20,22 @@
|
|
|
appendScript('https://cdn.bootcss.com/html5shiv/r29/html5.min.js')
|
|
appendScript('https://cdn.bootcss.com/html5shiv/r29/html5.min.js')
|
|
|
appendScript('https://cdn.bootcss.com/js-polyfills/0.1.33/polyfill.min.js')
|
|
appendScript('https://cdn.bootcss.com/js-polyfills/0.1.33/polyfill.min.js')
|
|
|
}
|
|
}
|
|
|
|
|
+ if (/(iPhone|iPad|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone)/ig.test(w.navigator.userAgent)) {
|
|
|
|
|
+ var docEl = d.documentElement
|
|
|
|
|
+ var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
|
|
|
|
+ var recalc = function () {
|
|
|
|
|
+ var clientWidth = docEl.clientWidth
|
|
|
|
|
+ if (!clientWidth) return
|
|
|
|
|
+ if (clientWidth >= 750) {
|
|
|
|
|
+ docEl.style.fontSize = '100px'
|
|
|
|
|
+ } else {
|
|
|
|
|
+ docEl.style.fontSize = 100 * (clientWidth / 750) + 'px'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!d.addEventListener) return
|
|
|
|
|
+ w.addEventListener(resizeEvt, recalc, false)
|
|
|
|
|
+ d.addEventListener('DOMContentLoaded', recalc, false)
|
|
|
|
|
+ }
|
|
|
})(window, document)
|
|
})(window, document)
|
|
|
</script>
|
|
</script>
|
|
|
</head>
|
|
</head>
|