fnResize(); window.onresize = function () { fnResize(); } function fnResize() { var docWidth = document.documentElement.clientWidth; if(docWidth <= 550){ var deviceWidth = document.documentElement.clientWidth || window.innerWidth; if (deviceWidth >= 550) { deviceWidth = 550; } if (deviceWidth <= 320) { deviceWidth = 320; } document.documentElement.style.fontSize = (deviceWidth / 7.5) + 'px'; } } document.addEventListener('keydown', function (event) { if ((event.ctrlKey === true || event.metaKey === true) && (event.which === 61 || event.which === 107 || event.which === 173 || event.which === 109 || event.which === 187 || event.which === 189)){ event.preventDefault(); } }, false); document.addEventListener('DOMMouseScroll', function (event) { if (event.ctrlKey === true || event.metaKey) { event.preventDefault(); } }, false); document.addEventListener('mousewheel', function (event) { if (event.ctrlKey === true || event.metaKey) { event.preventDefault(); } }, false);