1

I'm developing a google gadget which needs to display one way if it is being viewed on a mobile/smartphone operating system (e.g. Android, iPhone, or any device that uses a mobile iGoogle page). But I only want it to display that way if the operating system is using mobile iGoogle.

I simply need JavaScript code to detect the operating system (if this can be done from within a google gadget). I've done a bit of research, but none of the codes are very simple.

Does anybody have ideas or suggestions?

1 Answer 1

1

You can find out what OS you are on by using the following:

navigator.appVersion or navigator.userAgent

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.