(function () { 'use strict'; const makeRetina = () => { const retinaImages = document.getElementsByClassName('make-retina'); for (let i = 0; i < retinaImages.length; i++) { let width = retinaImages[i].naturalWidth; let height = retinaImages[i].naturalHeight; retinaImages[i].style.width = width / 2 + 'px'; retinaImages[i].style.height = height / 2 + 'px'; } }; if (window.innerWidth >= 1024) { window.addEventListener('load', makeRetina); } })();