Skip to content

Instantly share code, notes, and snippets.

@d4c5d1e0
Created October 28, 2022 19:31
Show Gist options
  • Save d4c5d1e0/6c85cdfaf8eea7b722c3fd669851ede5 to your computer and use it in GitHub Desktop.
Save d4c5d1e0/6c85cdfaf8eea7b722c3fd669851ede5 to your computer and use it in GitHub Desktop.
function (e) {
var n = e.width,
t = e.height;
return !("CSS2Properties" in window && "devicePixelRatio" in window && 1 !== devicePixelRatio || matchMedia("(device-width: ".concat(n, "px) and (device-height: ").concat(t, "px)")).matches)
}({
width: window.screen.width,
height: window.screen.height
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment