JS call to return resolution?

Is there a js call that can return the current resolution of either the screen itself or at least the resolution RPG maker is being run at?


I can use yanfly to adjust the resolution, but I'm considering putting together a script that will automatically space pictures evenly across the screen based upon the resolution of the device/game.


Thanks in advance! 🙂
Just standard javascript should do the trick

Code:
window.screen.availHeight;
window.screen.availWidth;
Worked...like...a...CHARM!


Thank you so much! 😀
Just standard javascript should do the trick



window.screen.availHeight;
window.screen.availWidth;



Okay, bonus question...


Is there a call to return the model/OS of the device it's currently running on?
Okay, bonus question...


Is there a call to return the model/OS of the device it's currently running on?


In a web browser you can use


navigator.platform;


To return a String containing the OS

I have not personally tested in MV though so I have no idea if it works
I use this: 

Original thread: https://forums.rpgmakerweb.com/threads/js-call-to-return-resolution.69851/