Can someone make detect device rotate

I have a custom slide out menu that I use toolbox run javascript to display.
open:
image
closed:
image
The problem is when the users mobile device is rotated the menu position is off.
If someone could make a paid/subscription plugin for event: device rotated where I could run the position javascript I would be grateful. I’m sure other people might want this too.
My javascript knowledge is bad so if someone could alternatively show me how to run this code (when device rotate) from toolbox that would be fine too.
@lottemint.md @anticode @nocodeventure

1 Like

I’m trying to make use of this repo on github to force portrait viewport, I would prefer to do this altogether.

1 Like

Of you want to “force” user to rotate, this script will not be hard to create a plugin with.

Aye thanks Jici, I didn’t find that plugin when searching, I think this will be fine to run true/false condition with menu visible.

1 Like