Adding Javascript to check dimensions in Qualtrics

Does anyone know if it’s possible to alter the meta info question in Qualtrics to check phone dimensions?

By default, it provides the screen resolution of the respondent’s browser in pixels. However, I’m trying to create a screening survey that checks respondents’ phone dimensions so I can determine whether are eligible for a study without asking them to measure their phones as it seems lots of people don’t know their phone dimensions.

Does anyone know how to do this using Javascript?

I’m familiar with Javascript but not sure where to start with this particular issue.

Thank you!