Thread:Extension talk:Widgets/Detect browser in widget

I want to modify the Iframe widget, so that mobile users would see a link instead of the IFrame. How can I achieve this?

In the widget code, can I detect the OS/browser?

Reason I need this: Some mobile platforms don't support the  HTML element well; and for small screens it makes more sense to show the content full-screen anyway. Thanks a lot!